summaryrefslogtreecommitdiff
path: root/lib/Target/CppBackend
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-06-26 12:17:21 +0000
committerGabor Greif <ggreif@gmail.com>2010-06-26 12:17:21 +0000
commit7a1d92a2cbc20888260efa7d5ad987dc39fcb134 (patch)
tree7148907bd6bcaf3043445fbadbf89415ca2419c6 /lib/Target/CppBackend
parent6bec14fea0c2a02a6c5255fd18b6fb1de1df9c3f (diff)
downloadllvm-7a1d92a2cbc20888260efa7d5ad987dc39fcb134.tar.gz
llvm-7a1d92a2cbc20888260efa7d5ad987dc39fcb134.tar.bz2
llvm-7a1d92a2cbc20888260efa7d5ad987dc39fcb134.tar.xz
use ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CppBackend')
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index 27fa319192..eda08e7a88 100644
--- a/lib/Target/CppBackend/CPPBackend.cpp
+++ b/lib/Target/CppBackend/CPPBackend.cpp
@@ -1289,7 +1289,7 @@ void CppWriter::printInstruction(const Instruction *I,
<< allocaI->getAlignment() << ");";
break;
}
- case Instruction::Load:{
+ case Instruction::Load: {
const LoadInst* load = cast<LoadInst>(I);
Out << "LoadInst* " << iName << " = new LoadInst("
<< opNames[0] << ", \"";
@@ -1384,7 +1384,7 @@ void CppWriter::printInstruction(const Instruction *I,
Out << "\", " << bbname << ");";
break;
}
- case Instruction::Call:{
+ case Instruction::Call: {
const CallInst* call = cast<CallInst>(I);
if (const InlineAsm* ila = dyn_cast<InlineAsm>(call->getCalledValue())) {
Out << "InlineAsm* " << getCppName(ila) << " = InlineAsm::get("
@@ -1394,7 +1394,7 @@ void CppWriter::printInstruction(const Instruction *I,
<< (ila->hasSideEffects() ? "true" : "false") << ");";
nl(Out);
}
- if (call->getNumOperands() > 2) {
+ if (call->getNumArgOperands() > 1) {
Out << "std::vector<Value*> " << iName << "_params;";
nl(Out);
for (unsigned i = 1; i < call->getNumOperands(); ++i) {
@@ -1404,7 +1404,7 @@ void CppWriter::printInstruction(const Instruction *I,
Out << "CallInst* " << iName << " = CallInst::Create("
<< opNames[0] << ", " << iName << "_params.begin(), "
<< iName << "_params.end(), \"";
- } else if (call->getNumOperands() == 2) {
+ } else if (call->getNumArgOperands() == 1) {
Out << "CallInst* " << iName << " = CallInst::Create("
<< opNames[0] << ", " << opNames[1] << ", \"";
} else {
@@ -1417,7 +1417,7 @@ void CppWriter::printInstruction(const Instruction *I,
printCallingConv(call->getCallingConv());
Out << ");";
nl(Out) << iName << "->setTailCall("
- << (call->isTailCall() ? "true":"false");
+ << (call->isTailCall() ? "true" : "false");
Out << ");";
printAttributes(call->getAttributes(), iName);
Out << iName << "->setAttributes(" << iName << "_PAL);";