summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/EmitAssembly.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Sparc/EmitAssembly.cpp')
-rw-r--r--llvm/lib/Target/Sparc/EmitAssembly.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index 6080e99e73f..019d447e502 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -585,9 +585,7 @@ static string getAsCString(const ConstantArray *CVA) {
const Type *ETy = cast<ArrayType>(CVA->getType())->getElementType();
Result = "\"";
for (unsigned i = 0; i < CVA->getNumOperands(); ++i) {
- unsigned char C = (ETy == Type::SByteTy) ?
- (unsigned char)cast<ConstantSInt>(CVA->getOperand(i))->getValue() :
- (unsigned char)cast<ConstantUInt>(CVA->getOperand(i))->getValue();
+ unsigned char C = cast<ConstantInt>(CVA->getOperand(i))->getRawValue();
if (C == '"') {
Result += "\\\"";
OpenPOWER on IntegriCloud