Add a comment and ensure that anyone else looking at this code doesn't start
authorEric Christopher <echristo@apple.com>
Fri, 6 Jan 2012 23:03:37 +0000 (23:03 +0000)
committerEric Christopher <echristo@apple.com>
Fri, 6 Jan 2012 23:03:37 +0000 (23:03 +0000)
to bleed from the eyes.

llvm-svn: 147695

llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

index e499d2c..99b6bfc 100644 (file)
@@ -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());