diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-19 21:57:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-19 21:57:37 +0000 |
commit | ebf8e6cd924bb441398c406fa3a67d93c86a49dd (patch) | |
tree | 1b226cb9fe1bb79a79aaf5a65dbff95b148b6ec1 /lib/Bytecode/Writer/Writer.cpp | |
parent | 7dd29aadf9147d402969302268f82bc4b8903c15 (diff) |
Fix misencoding of calling conventions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 80abcacee9..4ec6b2a41e 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -734,8 +734,9 @@ void BytecodeWriter::outputInstruction(const Instruction &I) { // If this is the escape sequence for call, emit the tailcall/cc info. const CallInst &CI = cast<CallInst>(I); ++NumOperands; - if (NumOperands < 3) { - Slots[NumOperands-1] = (CI.getCallingConv() << 1)|unsigned(CI.isTailCall()); + if (NumOperands <= 3) { + Slots[NumOperands-1] = + (CI.getCallingConv() << 1)|unsigned(CI.isTailCall()); if (Slots[NumOperands-1] > MaxOpSlot) MaxOpSlot = Slots[NumOperands-1]; } |