[cfe-commits] r149560 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Eric Christopher
echristo at apple.com
Wed Feb 1 15:39:01 PST 2012
Author: echristo
Date: Wed Feb 1 17:39:00 2012
New Revision: 149560
URL: http://llvm.org/viewvc/llvm-project?rev=149560&view=rev
Log:
r149474 went a bit too far when combined with type caching. If we want
a full type go ahead and emit it if we currently only have a forward
declaration.
Fixes gdb bots for gdb1090.exp and call-ar-st.exp.
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=149560&r1=149559&r2=149560&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Feb 1 17:39:00 2012
@@ -1637,9 +1637,12 @@
// Unwrap the type as needed for debug information.
Ty = UnwrapTypeForDebugInfo(Ty);
-
+
+ // Check if we already have the type. If we've gotten here and
+ // have a forward declaration of the type we may want the full type.
+ // Go ahead and create it if that's the case.
llvm::DIType T = getTypeOrNull(Ty);
- if (T.Verify()) return T;
+ if (T.Verify() && !T.isForwardDecl()) return T;
// Otherwise create the type.
llvm::DIType Res = CreateTypeNode(Ty, Unit);
More information about the cfe-commits
mailing list