aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index 6ff05b5ed7..c1e81d4b5a 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -1819,7 +1819,7 @@ std::string CppWriter::generateInstruction(const Instruction *I) {
case Instruction::Trunc: {
//unsigned inBits = V->getType()->getIntegerBitWidth();
unsigned outBits = I->getType()->getIntegerBitWidth();
- text += getCppName(I->getOperand(0)) + "&" + utostr(pow(2, outBits)-1);
+ text += getValueAsStr(I->getOperand(0)) + "&" + utostr(pow(2, outBits)-1);
break;
}
case Instruction::SExt: {