[llvm-commits] [dragonegg] r104437 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat May 22 04:27:36 PDT 2010
Author: baldrick
Date: Sat May 22 06:27:36 2010
New Revision: 104437
URL: http://llvm.org/viewvc/llvm-project?rev=104437&view=rev
Log:
Port commit 103414 (dpatel) from llvm-gcc:
Do not emit variable debug info if debug info for corresponding type is not available.
This fixes PR 7104 crash.
Modified:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=104437&r1=104436&r2=104437&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat May 22 06:27:36 2010
@@ -402,6 +402,9 @@
DIType Ty = getOrCreateType(type);
if (DECL_ARTIFICIAL (decl))
Ty = DebugFactory.CreateArtificialType(Ty);
+ // If type info is not available then do not emit debug info for this var.
+ if (!Ty)
+ return;
llvm::DIVariable D =
DebugFactory.CreateVariable(Tag, VarScope,
Name, getOrCreateFile(Loc.file),
@@ -1069,6 +1072,7 @@
// gen_type_die(TYPE_OFFSET_BASETYPE(type), context_die);
// gen_type_die(TREE_TYPE(type), context_die);
// gen_ptr_to_mbr_type_die(type, context_die);
+ // PR 7104
break;
}
More information about the llvm-commits
mailing list