[cfe-commits] r129046 - /cfe/trunk/lib/CodeGen/CGVTables.cpp

Ken Dyck kd at kendyck.com
Wed Apr 6 17:59:42 PDT 2011


Author: kjdyck
Date: Wed Apr  6 19:59:42 2011
New Revision: 129046

URL: http://llvm.org/viewvc/llvm-project?rev=129046&view=rev
Log:
[Reapply r128771. It wasn't the source of the issues Devang saw with debug
info.]

Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.


Modified:
    cfe/trunk/lib/CodeGen/CGVTables.cpp

Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=129046&r1=129045&r2=129046&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Wed Apr  6 19:59:42 2011
@@ -2173,13 +2173,13 @@
     // We store the virtual base class names and their offsets in a map to get
     // a stable order.
 
-    std::map<std::string, int64_t> ClassNamesAndOffsets;
+    std::map<std::string, CharUnits> ClassNamesAndOffsets;
     for (VBaseOffsetOffsetsMapTy::const_iterator I = VBaseOffsetOffsets.begin(),
          E = VBaseOffsetOffsets.end(); I != E; ++I) {
       std::string ClassName = I->first->getQualifiedNameAsString();
       CharUnits OffsetOffset = I->second;
       ClassNamesAndOffsets.insert(
-          std::make_pair(ClassName, OffsetOffset.getQuantity()));
+          std::make_pair(ClassName, OffsetOffset));
     }
     
     Out << "Virtual base offset offsets for '";
@@ -2187,10 +2187,10 @@
     Out << ClassNamesAndOffsets.size();
     Out << (ClassNamesAndOffsets.size() == 1 ? " entry" : " entries") << ").\n";
 
-    for (std::map<std::string, int64_t>::const_iterator I =
+    for (std::map<std::string, CharUnits>::const_iterator I =
          ClassNamesAndOffsets.begin(), E = ClassNamesAndOffsets.end(); 
          I != E; ++I)
-      Out << "   " << I->first << " | " << I->second << '\n';
+      Out << "   " << I->first << " | " << I->second.getQuantity() << '\n';
 
     Out << "\n";
   }





More information about the cfe-commits mailing list