aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-13 15:31:36 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-13 15:31:36 +0000
commitd20bb803c06616a6e35c94cf8e1b4bdfb85919d5 (patch)
tree5b68f34a7f7b021e6d68f19d375e92f2e59f051e /lib/VMCore/Verifier.cpp
parent783e7f99e1ff5c54b3a538bee8d67b6e57d40d45 (diff)
downloadexternal_llvm-d20bb803c06616a6e35c94cf8e1b4bdfb85919d5.zip
external_llvm-d20bb803c06616a6e35c94cf8e1b4bdfb85919d5.tar.gz
external_llvm-d20bb803c06616a6e35c94cf8e1b4bdfb85919d5.tar.bz2
rotate CallInst operands
with this commit the callee moves to the end of the operand array (from the start) and the call arguments now start at index 0 (formerly 1) this ordering is now consistent with InvokeInst this commit only flips the switch, functionally it is equivalent to r101465 I intend to commit several cleanups after a few days of soak period git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108240 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 383f062..f97699d 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1454,7 +1454,7 @@ void Verifier::visitInstruction(Instruction &I) {
if (Function *F = dyn_cast<Function>(I.getOperand(i))) {
// Check to make sure that the "address of" an intrinsic function is never
// taken.
- Assert1(!F->isIntrinsic() || (i == 0 && isa<CallInst>(I)),
+ Assert1(!F->isIntrinsic() || (i + 1 == e && isa<CallInst>(I)),
"Cannot take the address of an intrinsic!", &I);
Assert1(F->getParent() == Mod, "Referencing function in another module!",
&I);
@@ -1537,7 +1537,8 @@ void Verifier::visitInstruction(Instruction &I) {
"Instruction does not dominate all uses!", Op, &I);
}
} else if (isa<InlineAsm>(I.getOperand(i))) {
- Assert1((i == 0 && isa<CallInst>(I)) || (i + 3 == e && isa<InvokeInst>(I)),
+ Assert1((i + 1 == e && isa<CallInst>(I)) ||
+ (i + 3 == e && isa<InvokeInst>(I)),
"Cannot take the address of an inline asm!", &I);
}
}