summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-02-01 23:39:00 +0000
committerEric Christopher <echristo@apple.com>2012-02-01 23:39:00 +0000
commitc9e6924fb2e926ba1e6077c2604b0007b5fdea68 (patch)
treed7538af6c8517bc54f2ce025abe26e1c00f916d5 /clang/lib/CodeGen
parent6d65d7b63d1cc7c045e541fa7a81bbd7317378bd (diff)
downloadbcm5719-llvm-c9e6924fb2e926ba1e6077c2604b0007b5fdea68.tar.gz
bcm5719-llvm-c9e6924fb2e926ba1e6077c2604b0007b5fdea68.zip
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. llvm-svn: 149560
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index b793eb60df6..f660e3c95e2 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1637,9 +1637,12 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit) {
// 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);
OpenPOWER on IntegriCloud