llvm.org GIT mirror llvm / 7a1d92a
use ArgOperand API git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106946 91177308-0d34-0410-b5e6-96231b3b80d8 Gabor Greif 10 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
12881288 << allocaI->getAlignment() << ");";
12891289 break;
12901290 }
1291 case Instruction::Load:{
1291 case Instruction::Load: {
12921292 const LoadInst* load = cast(I);
12931293 Out << "LoadInst* " << iName << " = new LoadInst("
12941294 << opNames[0] << ", \"";
13831383 Out << "\", " << bbname << ");";
13841384 break;
13851385 }
1386 case Instruction::Call:{
1386 case Instruction::Call: {
13871387 const CallInst* call = cast(I);
13881388 if (const InlineAsm* ila = dyn_cast(call->getCalledValue())) {
13891389 Out << "InlineAsm* " << getCppName(ila) << " = InlineAsm::get("
13931393 << (ila->hasSideEffects() ? "true" : "false") << ");";
13941394 nl(Out);
13951395 }
1396 if (call->getNumOperands() > 2) {
1396 if (call->getNumArgOperands() > 1) {
13971397 Out << "std::vector " << iName << "_params;";
13981398 nl(Out);
13991399 for (unsigned i = 1; i < call->getNumOperands(); ++i) {
14031403 Out << "CallInst* " << iName << " = CallInst::Create("
14041404 << opNames[0] << ", " << iName << "_params.begin(), "
14051405 << iName << "_params.end(), \"";
1406 } else if (call->getNumOperands() == 2) {
1406 } else if (call->getNumArgOperands() == 1) {
14071407 Out << "CallInst* " << iName << " = CallInst::Create("
14081408 << opNames[0] << ", " << opNames[1] << ", \"";
14091409 } else {
14161416 printCallingConv(call->getCallingConv());
14171417 Out << ");";
14181418 nl(Out) << iName << "->setTailCall("
1419 << (call->isTailCall() ? "true":"false");
1419 << (call->isTailCall() ? "true" : "false");
14201420 Out << ");";
14211421 printAttributes(call->getAttributes(), iName);
14221422 Out << iName << "->setAttributes(" << iName << "_PAL);";