diff -w -b -B -d -r -u llvm-3.7.0/lib/Target/CppBackend/CPPBackend.cpp new-3.7.0/lib/Target/CppBackend/CPPBackend.cpp --- llvm-3.7.0/lib/Target/CppBackend/CPPBackend.cpp 2015-07-07 00:44:26.000000000 +0700 +++ new-3.7.0/lib/Target/CppBackend/CPPBackend.cpp 2015-09-02 20:42:23.938404300 +0700 @@ -1357,7 +1357,7 @@ const GetElementPtrInst* gep = cast(I); if (gep->getNumOperands() <= 2) { Out << "GetElementPtrInst* " << iName << " = GetElementPtrInst::Create(" - << opNames[0]; + << getCppName(gep->getType()) << ", " << opNames[0]; if (gep->getNumOperands() == 2) Out << ", " << opNames[1]; } else { @@ -1369,7 +1369,7 @@ nl(Out); } Out << "Instruction* " << iName << " = GetElementPtrInst::Create(" - << opNames[0] << ", " << iName << "_indices"; + << getCppName(gep->getType()) << ", " << opNames[0] << ", " << iName << "_indices"; } Out << ", \""; printEscapedString(gep->getName());