Quiet VC++ warnings
authorChris Lattner <sabre@nondot.org>
Fri, 5 Nov 2004 04:50:59 +0000 (04:50 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 5 Nov 2004 04:50:59 +0000 (04:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17484 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CodeEmitter.cpp
utils/TableGen/InstrSelectorEmitter.cpp
utils/TableGen/Record.cpp

index eef01adfb0cffafe30a6c82a373d6bc628e45436..98cd863f430c9f8434177a869e6af09933c154cc 100644 (file)
@@ -61,11 +61,11 @@ namespace {
 
 
 void *X86JITInfo::getJITStubForFunction(Function *F, MachineCodeEmitter &MCE) {
-  return (void*)((unsigned long)getResolver(MCE).getLazyResolver(F));
+  return (void*)(intptr_t)getResolver(MCE).getLazyResolver(F);
 }
 
 void X86JITInfo::replaceMachineCodeForFunction (void *Old, void *New) {
-  char *OldByte = (char *) Old;
+  unsigned char *OldByte = (char *) Old;
   *OldByte++ = 0xE9;                // Emit JMP opcode.
   int32_t *OldWord = (int32_t *) OldByte;
   int32_t NewAddr = (intptr_t) New;
index 9a2ce4a6e870a6687608a2132b297fa02c43c99e..e9c63441aeae06c323f193ac5121fcf494b8e53f 100644 (file)
@@ -344,7 +344,7 @@ bool Pattern::InferTypes(TreePatternNode *N, bool &MadeChange) {
     break;
   }
 
-  return AnyUnset | N->getType() == MVT::Other;
+  return AnyUnset | (N->getType() == MVT::Other);
 }
 
 /// clone - This method is used to make an exact copy of the current pattern,
index 38e1dff89fd23cc2387bc3600c6cfb1b1bdd7be6..8c8e7b97f7bf0f7ccfcf0caaf90bdaa90310c6df 100644 (file)
@@ -67,7 +67,7 @@ Init *BitsRecTy::convertValue(IntInit *II) {
     if (Value & ~((1LL << Size)-1))
       return 0;
   } else {
-    if ((Value >> Size) != -1 || ((Value & (1 << Size-1)) == 0))
+    if ((Value >> Size) != -1 || ((Value & (1 << (Size-1))) == 0))
       return 0;
   }