diff options
author | Owen Anderson <resistor@mac.com> | 2006-05-20 00:24:56 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2006-05-20 00:24:56 +0000 |
commit | d988b32abad0634df07c18629e899f256935fde7 (patch) | |
tree | eb2a0c7e6ea1e92e113c361ae2f760fabe02bf1c /lib/Target/TargetData.cpp | |
parent | a831a6c1c5d071fadf348473ca12254b88b18605 (diff) |
Make all of the TargetMachine subclasses use the new string TargetData methods.
This is part of the on-going work on PR 761.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index ad13b1ef4e..7bb77636c8 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -123,6 +123,10 @@ TargetData::TargetData(const std::string &TargetName, TargetData::TargetData(const std::string &TargetName, const std::string &TargetDescription) { + assert(!TargetName.empty() && + "ERROR: Tool did not specify a target data to use!"); + + std::string temp = TargetDescription; LittleEndian = false; @@ -136,7 +140,7 @@ TargetData::TargetData(const std::string &TargetName, ByteAlignment = 1; BoolAlignment = 1; - while (temp.length() > 0) { + while (!temp.empty()) { std::string token = getToken(temp, "-"); char signal = getToken(token, ":")[0]; |