[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ConstantReader.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 15 12:40:12 PST 2004


Changes in directory llvm/lib/Bytecode/Reader:

ConstantReader.cpp updated: 1.70 -> 1.71

---
Log message:

Fix more breakage with string change.


---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/Bytecode/Reader/ConstantReader.cpp
diff -u llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.70 llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.71
--- llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.70	Thu Jan 15 10:56:15 2004
+++ llvm/lib/Bytecode/Reader/ConstantReader.cpp	Thu Jan 15 12:39:06 2004
@@ -298,10 +298,10 @@
     std::vector<Constant*> Elements(ATy->getNumElements());
     if (ATy->getElementType() == Type::SByteTy)
       for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i)
-        Elements[i] = ConstantSInt::get(Type::SByteTy, Data[i]);
+        Elements[i] = ConstantSInt::get(Type::SByteTy, (signed char)Data[i]);
     else
       for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i)
-        Elements[i] = ConstantUInt::get(Type::UByteTy, Data[i]);
+        Elements[i] = ConstantUInt::get(Type::UByteTy, (unsigned char)Data[i]);
 
     // Create the constant, inserting it as needed.
     Constant *C = ConstantArray::get(ATy, Elements);





More information about the llvm-commits mailing list