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 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;