[llvm-commits] [llvm] r147695 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

Eric Christopher echristo at apple.com
Fri Jan 6 15:03:37 PST 2012


Author: echristo
Date: Fri Jan  6 17:03:37 2012
New Revision: 147695

URL: http://llvm.org/viewvc/llvm-project?rev=147695&view=rev
Log:
Add a comment and ensure that anyone else looking at this code doesn't start
to bleed from the eyes.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=147695&r1=147694&r2=147695&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Jan  6 17:03:37 2012
@@ -613,15 +613,14 @@
     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());





More information about the llvm-commits mailing list