summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2006-05-20 00:24:56 +0000
committerOwen Anderson <resistor@mac.com>2006-05-20 00:24:56 +0000
commit88812b5c0a1006393a0d9e060408206926d091fd (patch)
treeab480afcbd5e6918105db2916207e4db35cf5f12 /llvm/lib/Target/TargetData.cpp
parentc4e9aff50f5d941d954694e4b5d59ddd354e5aec (diff)
downloadbcm5719-llvm-88812b5c0a1006393a0d9e060408206926d091fd.tar.gz
bcm5719-llvm-88812b5c0a1006393a0d9e060408206926d091fd.zip
Make all of the TargetMachine subclasses use the new string TargetData methods.
This is part of the on-going work on PR 761. llvm-svn: 28414
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
-rw-r--r--llvm/lib/Target/TargetData.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index ad13b1ef4e3..7bb77636c81 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/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];
OpenPOWER on IntegriCloud