Fix more breakage with string change.
authorChris Lattner <sabre@nondot.org>
Thu, 15 Jan 2004 18:39:06 +0000 (18:39 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 15 Jan 2004 18:39:06 +0000 (18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10882 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Reader/ConstantReader.cpp

index 93a9afac72ab95ce6cc74ffbae2bafad8b80bc74..c8e9feb0bef1dbf7314338d7dc400d727d52085a 100644 (file)
@@ -298,10 +298,10 @@ void BytecodeParser::parseStringConstants(const unsigned char *&Buf,
     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);