Fix bug: Assembler/2003-01-30-UnsignedString.ll
authorChris Lattner <sabre@nondot.org>
Thu, 30 Jan 2003 22:24:26 +0000 (22:24 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Jan 2003 22:24:26 +0000 (22:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5445 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 1c990e72aa009fd29bda3ce1d61630e5b2626982..1189bb3706d09b5c519af52f34a88adaf70dad86 100644 (file)
@@ -903,7 +903,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
        Vals.push_back(ConstantSInt::get(ETy, *C));
     } else if (ETy == Type::UByteTy) {
       for (char *C = $3; C != EndStr; ++C)
-       Vals.push_back(ConstantUInt::get(ETy, *C));
+       Vals.push_back(ConstantUInt::get(ETy, (unsigned char)*C));
     } else {
       free($3);
       ThrowException("Cannot build string arrays of non byte sized elements!");