Make TargetData::getStringRepresentation spit out native integer types,
authorChris Lattner <sabre@nondot.org>
Sun, 8 Nov 2009 02:32:01 +0000 (02:32 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 8 Nov 2009 02:32:01 +0000 (02:32 +0000)
this gives llvm-gcc generated modules the right data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86435 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetData.cpp

index b6b84c52956808073d7790769ebbfc6c57fa03e9..c2fbd3f0e61e4fdfea4208d541a3ab936232fd49 100644 (file)
@@ -392,6 +392,13 @@ std::string TargetData::getStringRepresentation() const {
     OS << '-' << (char)AI.AlignType << AI.TypeBitWidth << ':'
        << AI.ABIAlign*8 << ':' << AI.PrefAlign*8;
   }
+  
+  if (!LegalIntWidths.empty()) {
+    OS << "-n" << (unsigned)LegalIntWidths[0];
+    
+    for (unsigned i = 1, e = LegalIntWidths.size(); i != e; ++i)
+      OS << ':' << (unsigned)LegalIntWidths[i];
+  }
   return OS.str();
 }