aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-01-26 07:11:58 +0000
committerEric Christopher <echristo@apple.com>2012-01-26 07:11:58 +0000
commit5b78a244ef213835337a5a860fe7c3f2fa90a943 (patch)
tree3eedac51d6992f41cf0e692606b113d3ff787800
parent1c081d97b6f1785013e2294bcc5209d468c0765e (diff)
Use createRecordFwdDecl here since that's what we're doing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149051 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 6a775ccba6..2ddfd31083 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1147,15 +1147,8 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) {
// If this is just a forward declaration, construct an appropriately
// marked node and just return it.
- if (!RD->getDefinition()) {
- llvm::DIType FwdDecl =
- DBuilder.createStructType(RDContext, RDName,
- DefUnit, Line, 0, 0,
- llvm::DIDescriptor::FlagFwdDecl,
- llvm::DIArray());
-
- return FwdDecl;
- }
+ if (!RD->getDefinition())
+ return createRecordFwdDecl(RD, RDContext);
llvm::DIType FwdDecl = DBuilder.createTemporaryType(DefUnit);