Disallow the undocumented practice of starting the datalayout string with '-'.
authorPatrik Hägglund <patrik.h.hagglund@ericsson.com>
Fri, 23 Nov 2012 14:51:42 +0000 (14:51 +0000)
committerPatrik Hägglund <patrik.h.hagglund@ericsson.com>
Fri, 23 Nov 2012 14:51:42 +0000 (14:51 +0000)
Update some test cases accordingly.

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

lib/VMCore/DataLayout.cpp
test/Transforms/IndVarSimplify/iv-zext.ll
test/Transforms/InstCombine/align-external.ll
test/Transforms/SimplifyLibCalls/Puts.ll

index 24111be31623c54a014997a92f65c25f0fd0cf8e..e21868be4420b91ffd47fd9dfbee79983829c7ed 100644 (file)
@@ -193,9 +193,6 @@ std::string DataLayout::parseSpecifier(StringRef Desc) {
     StringRef Token = Split.first;
     Desc = Split.second;
 
-    if (Token.empty())
-      continue;
-
     Split = Token.split(':');
     StringRef Specifier = Split.first;
     Token = Split.second;
index 2e0f70ce461aea24f514a1f60bfac3ec04ef44c6..ed0514b08e332a9807705b9fd140271280c21acd 100644 (file)
@@ -2,7 +2,7 @@
 ; CHECK-NOT: and
 ; CHECK-NOT: zext
 
-target datalayout = "-p:64:64:64-n32:64"
+target datalayout = "p:64:64:64-n32:64"
 
 define void @foo(double* %d, i64 %n) nounwind {
 entry:
index d4a5d429912bf25e030c1baaced8a60913c049f1..c3ef2dbb70f036a9eb509f5e59fa8b4f507e4b49 100644 (file)
@@ -8,7 +8,7 @@
 ; CHECK: %q = add i64 %r, 1
 ; CHECK: ret i64 %q
 
-target datalayout = "-i32:8:32"
+target datalayout = "i32:8:32"
 
 @A = external global i32
 @B = weak_odr global i32 0
index 48431434cc613f70711a3c8425aeca6e3f92a8b7..aa689048104b4220a1037f29730b83815136c52d 100644 (file)
@@ -1,7 +1,7 @@
 ; Test that the PutsOptimizer works correctly
 ; RUN: opt < %s -simplify-libcalls -S | FileCheck %s
 
-target datalayout = "-p:64:64:64"
+target datalayout = "p:64:64:64"
 
 @.str = private constant [1 x i8] zeroinitializer