[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

Jeff Cohen jeffc at jolt-lang.org
Fri May 6 19:44:15 PDT 2005



Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.103 -> 1.104
---
Log message:

Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.


---
Diffs of the changes:  (+2 -2)

 Writer.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.103 llvm/lib/Bytecode/Writer/Writer.cpp:1.104
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.103	Fri May  6 17:34:01 2005
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Fri May  6 21:44:04 2005
@@ -461,7 +461,7 @@
       output_vbr(cast<InvokeInst>(I)->getCallingConv());
     } else if (Opcode == 58) {  // Call escape sequence
       output_vbr((cast<CallInst>(I)->getCallingConv() << 1) |
-                 cast<CallInst>(I)->isTailCall());
+                 unsigned(cast<CallInst>(I)->isTailCall()));
     }
   } else {
     int Slot = Table.getSlot(I->getOperand(0));
@@ -731,7 +731,7 @@
       const CallInst &CI = cast<CallInst>(I);
       ++NumOperands;
       if (NumOperands < 3) {
-        Slots[NumOperands-1] = (CI.getCallingConv() << 1) | CI.isTailCall();
+        Slots[NumOperands-1] = (CI.getCallingConv() << 1)|unsigned(CI.isTailCall());
         if (Slots[NumOperands-1] > MaxOpSlot)
           MaxOpSlot = Slots[NumOperands-1];
       }






More information about the llvm-commits mailing list