From 429aaa585564be98499885137d839098d27a51f3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 5 Nov 2004 04:50:59 +0000 Subject: [PATCH] Quiet VC++ warnings llvm-svn: 17484 --- llvm/lib/Target/X86/X86CodeEmitter.cpp | 4 ++-- llvm/utils/TableGen/InstrSelectorEmitter.cpp | 2 +- llvm/utils/TableGen/Record.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index eef01adfb0cf..98cd863f430c 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp @@ -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; diff --git a/llvm/utils/TableGen/InstrSelectorEmitter.cpp b/llvm/utils/TableGen/InstrSelectorEmitter.cpp index 9a2ce4a6e870..e9c63441aeae 100644 --- a/llvm/utils/TableGen/InstrSelectorEmitter.cpp +++ b/llvm/utils/TableGen/InstrSelectorEmitter.cpp @@ -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, diff --git a/llvm/utils/TableGen/Record.cpp b/llvm/utils/TableGen/Record.cpp index 38e1dff89fd2..8c8e7b97f7bf 100644 --- a/llvm/utils/TableGen/Record.cpp +++ b/llvm/utils/TableGen/Record.cpp @@ -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; }