aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-01-06 23:03:37 +0000
committerEric Christopher <echristo@apple.com>2012-01-06 23:03:37 +0000
commite016789b7380b2a452f81ce15c2e382e62ede120 (patch)
treee098fb6f0fd7d46266cb135106c991e8e327b945 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parentfa03db0d2d896a689ac58cb63ec9e1b10af72868 (diff)
Add a comment and ensure that anyone else looking at this code doesn't start
to bleed from the eyes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index e499d2c8bf..99b6bfc5f3 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -613,15 +613,14 @@ DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
bool IsImplementation = 0;
if (Ty.isCompositeType()) {
DICompositeType CT(Ty);
+ // A runtime language of 0 actually means C/C++ and that any
+ // non-negative value is some version of Objective-C/C++.
IsImplementation = (CT.getRunTimeLang() == 0) ||
CT.isObjcClassComplete();;
}
-
- addAccelType(Ty.getName(),
- std::make_pair(TyDIE,
- (IsImplementation ?
- DwarfAccelTable::eTypeFlagClassIsImplementation :
- 0)));
+ unsigned Flags = IsImplementation ?
+ DwarfAccelTable::eTypeFlagClassIsImplementation : 0;
+ addAccelType(Ty.getName(), std::make_pair(TyDIE, Flags));
}
addToContextOwner(TyDIE, Ty.getContext());