[cfe-commits] r103320 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Fri May 7 16:05:56 PDT 2010
Author: dpatel
Date: Fri May 7 18:05:55 2010
New Revision: 103320
URL: http://llvm.org/viewvc/llvm-project?rev=103320&view=rev
Log:
If there is not any debug info for type then do not emit debug info for this variable.
A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=103320&r1=103319&r2=103320&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri May 7 18:05:55 2010
@@ -1478,6 +1478,11 @@
else
Ty = getOrCreateType(VD->getType(), Unit);
+ // If there is not any debug info for type then do not emit debug info
+ // for this variable.
+ if (!Ty)
+ return;
+
// Get location information.
SourceManager &SM = CGM.getContext().getSourceManager();
PresumedLoc PLoc = SM.getPresumedLoc(VD->getLocation());
More information about the cfe-commits
mailing list