[llvm-commits] CVS: llvm/lib/Target/TargetData.cpp
Owen Anderson
resistor at mac.com
Fri May 19 17:25:13 PDT 2006
Changes in directory llvm/lib/Target:
TargetData.cpp updated: 1.65 -> 1.66
---
Log message:
Make all of the TargetMachine subclasses use the new string TargetData methods.
This is part of the on-going work on PR 761: http://llvm.cs.uiuc.edu/PR761 .
---
Diffs of the changes: (+5 -1)
TargetData.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/TargetData.cpp
diff -u llvm/lib/Target/TargetData.cpp:1.65 llvm/lib/Target/TargetData.cpp:1.66
--- llvm/lib/Target/TargetData.cpp:1.65 Wed May 17 16:56:02 2006
+++ llvm/lib/Target/TargetData.cpp Fri May 19 19:24:56 2006
@@ -123,6 +123,10 @@
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 @@
ByteAlignment = 1;
BoolAlignment = 1;
- while (temp.length() > 0) {
+ while (!temp.empty()) {
std::string token = getToken(temp, "-");
char signal = getToken(token, ":")[0];
More information about the llvm-commits
mailing list