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 | 620895a47acf6ba9ed5d4ed0a733ca1ce364ced4 (patch) | |
tree | 82ce89a412a850e494a5590036c311179cc06d67 /llvm | |
parent | 3ea816fa4830bf6dfab6ccb4badb3174fd9a7290 (diff) | |
download | bcm5719-llvm-620895a47acf6ba9ed5d4ed0a733ca1ce364ced4.tar.gz bcm5719-llvm-620895a47acf6ba9ed5d4ed0a733ca1ce364ced4.zip |
Fix misencoding of calling conventions
llvm-svn: 28411
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 80abcacee97..4ec6b2a41e8 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/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]; } |