diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-13 18:04:51 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-13 18:04:51 -0800 |
commit | b3df7aac7d498e7948a9aa9259777ebc302ed822 (patch) | |
tree | 396e063c42713242756113a590399a651f0b0ed9 /lib/Target/CppBackend/CPPBackend.cpp | |
parent | 4415b57405525e543d46564b7b8f064f56cb98de (diff) |
fix trunc of const
Diffstat (limited to 'lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r-- | lib/Target/CppBackend/CPPBackend.cpp | 2 |
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: { |