From: Chris Lattner Date: Thu, 15 Jan 2004 18:39:06 +0000 (+0000) Subject: Fix more breakage with string change. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ff47e7d02ecbd4fc88ce02b952f3f021d9f4d9b5;p=oota-llvm.git Fix more breakage with string change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp index 93a9afac72a..c8e9feb0bef 100644 --- a/lib/Bytecode/Reader/ConstantReader.cpp +++ b/lib/Bytecode/Reader/ConstantReader.cpp @@ -298,10 +298,10 @@ void BytecodeParser::parseStringConstants(const unsigned char *&Buf, std::vector 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);