summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit8ea8e4fc76f69aaa122b19cf1a9b12b5c6c38719 (patch)
tree6f3227300ccdd9f6408eaf29c13bb3a885bc0354 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent090fcc1a10ce02bd19fce0c50f8aeb48dadf2f54 (diff)
downloadbcm5719-llvm-8ea8e4fc76f69aaa122b19cf1a9b12b5c6c38719.tar.gz
bcm5719-llvm-8ea8e4fc76f69aaa122b19cf1a9b12b5c6c38719.zip
Add a comment and ensure that anyone else looking at this code doesn't start
to bleed from the eyes. llvm-svn: 147695
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index e499d2c8bfe..99b6bfc5f35 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud