summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Hägglund <patrik.h.hagglund@ericsson.com>2012-11-23 14:51:42 +0000
committerPatrik Hägglund <patrik.h.hagglund@ericsson.com>2012-11-23 14:51:42 +0000
commit59189597dea143e68a4b86dd206c706cf3535365 (patch)
treecb8aa7dd42b19197edbf8b5a342a0696dfc1850d
parent88806c286577fe2954922d35ba31e426823ed405 (diff)
downloadbcm5719-llvm-59189597dea143e68a4b86dd206c706cf3535365.tar.gz
bcm5719-llvm-59189597dea143e68a4b86dd206c706cf3535365.zip
Disallow the undocumented practice of starting the datalayout string with '-'.
Update some test cases accordingly. llvm-svn: 168516
-rw-r--r--llvm/lib/VMCore/DataLayout.cpp3
-rw-r--r--llvm/test/Transforms/IndVarSimplify/iv-zext.ll2
-rw-r--r--llvm/test/Transforms/InstCombine/align-external.ll2
-rw-r--r--llvm/test/Transforms/SimplifyLibCalls/Puts.ll2
4 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/DataLayout.cpp b/llvm/lib/VMCore/DataLayout.cpp
index 24111be3162..e21868be442 100644
--- a/llvm/lib/VMCore/DataLayout.cpp
+++ b/llvm/lib/VMCore/DataLayout.cpp
@@ -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;
diff --git a/llvm/test/Transforms/IndVarSimplify/iv-zext.ll b/llvm/test/Transforms/IndVarSimplify/iv-zext.ll
index 2e0f70ce461..ed0514b08e3 100644
--- a/llvm/test/Transforms/IndVarSimplify/iv-zext.ll
+++ b/llvm/test/Transforms/IndVarSimplify/iv-zext.ll
@@ -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:
diff --git a/llvm/test/Transforms/InstCombine/align-external.ll b/llvm/test/Transforms/InstCombine/align-external.ll
index d4a5d429912..c3ef2dbb70f 100644
--- a/llvm/test/Transforms/InstCombine/align-external.ll
+++ b/llvm/test/Transforms/InstCombine/align-external.ll
@@ -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
diff --git a/llvm/test/Transforms/SimplifyLibCalls/Puts.ll b/llvm/test/Transforms/SimplifyLibCalls/Puts.ll
index 48431434cc6..aa689048104 100644
--- a/llvm/test/Transforms/SimplifyLibCalls/Puts.ll
+++ b/llvm/test/Transforms/SimplifyLibCalls/Puts.ll
@@ -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
OpenPOWER on IntegriCloud