From 84cc6dbd250c9422bb429c42f29442e2c516b666 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 17 May 2006 21:56:02 +0000 Subject: [PATCH] Fix a stupid bug when parsing TargetData strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28373 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/TargetData.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index f7c0d7800b7..ad13b1ef4e3 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -139,7 +139,9 @@ TargetData::TargetData(const std::string &TargetName, while (temp.length() > 0) { std::string token = getToken(temp, "-"); - switch(token[0]) { + char signal = getToken(token, ":")[0]; + + switch(signal) { case 'E': LittleEndian = false; break; -- 2.34.1