Make TargetData strings less redundant.
authorOwen Anderson <resistor@mac.com>
Sat, 20 May 2006 23:28:54 +0000 (23:28 +0000)
committerOwen Anderson <resistor@mac.com>
Sat, 20 May 2006 23:28:54 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28423 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetData.h
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/TargetData.cpp
lib/Target/X86/X86TargetMachine.cpp

index 428d05fdd5c120b5b6c6dab01a03181981bed955..17dc8254e5493355acd91268b6e84ebe9711fda6 100644 (file)
@@ -54,7 +54,7 @@ public:
              unsigned char ByteAl  = 1, unsigned char BoolAl   = 1);
 
   /// Constructs a TargetData from a string of the following format:
-  /// "E-p:64:64-d:64:64-f:32:32-l:64:64-i:32:32-s:16:16-b:8:8-B:8:8"
+  /// "E-p:64:64-d:64-f:32-l:64-i:32-s:16-b:8-B:8"
   /// The above string is considered the default, and any values not specified
   /// in the string will be assumed to be as above.
   TargetData(const std::string &TargetName,
index 0ac093ceb5154906e772a1efe9e38d36f25bed4d..82ea5c97427992483acbf4385d9973ac8d7f76aa 100644 (file)
@@ -59,7 +59,7 @@ unsigned PPCTargetMachine::getModuleMatchQuality(const Module &M) {
 
 PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS)
 : TargetMachine("PowerPC"),
-  DataLayout(std::string("PowerPC"), std::string("E-p:32:32-d:64:32-l:64:32")),
+  DataLayout(std::string("PowerPC"), std::string("E-p:32:32-d:32-l:32")),
   Subtarget(M, FS), FrameInfo(*this, false), JITInfo(*this),
   TLInfo(*this), InstrItins(Subtarget.getInstrItineraryData()) {
   if (TargetDefault == PPCTarget) {
index b94cb2de98d469a33323080ea119691d007f7a53..f7b7b4c3e5b4052c2395a093446082683d1ff66f 100644 (file)
@@ -157,31 +157,24 @@ TargetData::TargetData(const std::string &TargetName,
       PointerAlignment = atoi(getToken(token,":").c_str()) / 8;
       break;
     case 'd':
-      getToken(token,":"); //Ignore the size
       DoubleAlignment = atoi(getToken(token,":").c_str()) / 8;
       break;
     case 'f':
-      getToken(token, ":"); //Ignore the size
       FloatAlignment = atoi(getToken(token, ":").c_str()) / 8;
       break;
     case 'l':
-      getToken(token, ":"); //Ignore the size
       LongAlignment = atoi(getToken(token, ":").c_str()) / 8;
       break;
     case 'i':
-      getToken(token, ":"); //Ignore the size
       IntAlignment = atoi(getToken(token, ":").c_str()) / 8;
       break;
     case 's':
-      getToken(token, ":"); //Ignore the size
       ShortAlignment = atoi(getToken(token, ":").c_str()) / 8;
       break;
     case 'b':
-      getToken(token, ":"); //Ignore the size
       ByteAlignment = atoi(getToken(token, ":").c_str()) / 8;
       break;
     case 'B':
-      getToken(token, ":"); //Ignore the size
       BoolAlignment = atoi(getToken(token, ":").c_str()) / 8;
       break;
     default:
index cbe1e76186d767015b0bd90d1604ea273faf3d0e..846da901695f440276dbc08f80161f30e3b4b2d9 100644 (file)
@@ -69,7 +69,7 @@ unsigned X86TargetMachine::getModuleMatchQuality(const Module &M) {
 ///
 X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS)
   : TargetMachine("X86"),
-    DataLayout(std::string("X86"), std::string("e-p:32:32-d:64:32-l:64:32")),
+    DataLayout(std::string("X86"), std::string("e-p:32:32-d:32-l:32")),
     Subtarget(M, FS),
     FrameInfo(TargetFrameInfo::StackGrowsDown,
               Subtarget.getStackAlignment(), -4),