From bec9b0b9ef1f3b92f66e932754d2ab634830edee Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 14 Dec 2001 16:41:18 +0000 Subject: [PATCH] Make strings SByte* arrays instead of UByte * arrays llvm-svn: 1469 --- llvm/lib/VMCore/ConstPoolVals.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/VMCore/ConstPoolVals.cpp b/llvm/lib/VMCore/ConstPoolVals.cpp index 3814311f98a7..257bd7622c9d 100644 --- a/llvm/lib/VMCore/ConstPoolVals.cpp +++ b/llvm/lib/VMCore/ConstPoolVals.cpp @@ -436,12 +436,12 @@ ConstantArray *ConstantArray::get(const string &Str) { vector ElementVals; for (unsigned i = 0; i < Str.length(); ++i) - ElementVals.push_back(ConstantUInt::get(Type::UByteTy, Str[i])); + ElementVals.push_back(ConstantSInt::get(Type::SByteTy, Str[i])); // Add a null terminator to the string... - ElementVals.push_back(ConstantUInt::get(Type::UByteTy, 0)); + ElementVals.push_back(ConstantSInt::get(Type::SByteTy, 0)); - ArrayType *ATy = ArrayType::get(Type::UByteTy/*,stringConstant.length()*/); + ArrayType *ATy = ArrayType::get(Type::SByteTy, Str.length()+1); return ConstantArray::get(ATy, ElementVals); }