diff options
author | Chris Lattner <sabre@nondot.org> | 2001-12-14 16:41:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-12-14 16:41:18 +0000 |
commit | a2644f60ce58eb2ae2317b9f3074e704980325b6 (patch) | |
tree | 97f74415d0b6522297364feece3231195aa5c51e /lib/VMCore | |
parent | c933344f1e3b4d9112c2005e3fc2e51385e91aed (diff) | |
download | external_llvm-a2644f60ce58eb2ae2317b9f3074e704980325b6.zip external_llvm-a2644f60ce58eb2ae2317b9f3074e704980325b6.tar.gz external_llvm-a2644f60ce58eb2ae2317b9f3074e704980325b6.tar.bz2 |
Make strings SByte* arrays instead of UByte * arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/ConstPoolVals.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/ConstPoolVals.cpp b/lib/VMCore/ConstPoolVals.cpp index 3814311..257bd76 100644 --- a/lib/VMCore/ConstPoolVals.cpp +++ b/lib/VMCore/ConstPoolVals.cpp @@ -436,12 +436,12 @@ ConstantArray *ConstantArray::get(const string &Str) { vector<Constant*> 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); } |