default_dbg_info_merge_pair() now leaves debug info in only one node has one
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 12 Sep 2006 12:16:01 +0000 (12:16 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 12 Sep 2006 12:16:01 +0000 (12:16 +0000)
[r8219]

ir/debug/dbginfo.c

index 20ff762..02ea494 100644 (file)
@@ -3,10 +3,10 @@
  * File name:   ir/debug/dbginfo.c
  * Purpose:     Implements the Firm interface to debug information.
  * Author:      Goetz Lindenmaier
- * Modified by:
+ * Modified by: Michael Beck
  * Created:     2001
  * CVS-ID:      $Id$
- * Copyright:   (c) 2001-2003 Universität Karlsruhe
+ * Copyright:   (c) 2001-2006 Universität Karlsruhe
  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
 
@@ -21,7 +21,9 @@
 
 void
 default_dbg_info_merge_pair(ir_node *nw, ir_node *old, dbg_action info) {
-  set_irn_dbg_info(nw, get_irn_dbg_info(old));
+  dbg_info *old_db = get_irn_dbg_info(old);
+  if (old_db)
+    set_irn_dbg_info(nw, old_db);
 }
 
 void