diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-21 18:35:05 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-21 18:35:05 -0800 |
commit | 58ed85ef7760eab9e153061b7eb608bf1dd80d03 (patch) | |
tree | bb6f8703349dba433b3a495d9bd6bca5f582c425 /lib/Target/CppBackend/CPPBackend.cpp | |
parent | 19874a3f7c5de35435e79569d16a3e13f6dae441 (diff) |
fix mathop return type
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 f48cee13ee..454c5e5434 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -1277,7 +1277,7 @@ std::string CppWriter::generateInstruction(const Instruction *I) { case Instruction::LShr: case Instruction::AShr:{ //Out << "BinaryOperator* " << iName << " = BinaryOperator::Create("; - text = getAssign(iName, Type::getInt32Ty(I->getContext())); + text = getAssign(iName, I->getType()); switch (I->getOpcode()) { case Instruction::Add: text += getParenCast(getValueAsParenStr(I->getOperand(0)) + " + " + getValueAsParenStr(I->getOperand(1)), Type::getInt32Ty(I->getContext())) + ";"; break; case Instruction::FAdd: Out << "Instruction::FAdd"; break; |