Make TargetData strings less redundant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28423 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h
index 428d05f..17dc825 100644
--- a/include/llvm/Target/TargetData.h
+++ b/include/llvm/Target/TargetData.h
@@ -54,7 +54,7 @@
              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,
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 0ac093c..82ea5c9 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -59,7 +59,7 @@
 
 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) {
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index b94cb2d..f7b7b4c 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -157,31 +157,24 @@
       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:
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index cbe1e76..846da90 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -69,7 +69,7 @@
 ///
 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),