diff --git a/llvm/include/llvm/Support/CallSite.h b/llvm/include/llvm/Support/CallSite.h index cce000d87e15..d21c6ca5757a 100644 --- a/llvm/include/llvm/Support/CallSite.h +++ b/llvm/include/llvm/Support/CallSite.h @@ -49,13 +49,12 @@ protected: PointerIntPair I; public: CallSiteBase() : I(0, false) {} - CallSiteBase(CallTy *CI) : I(reinterpret_cast(CI), true) {} - CallSiteBase(InvokeTy *II) : I(reinterpret_cast(II), false) {} + CallSiteBase(CallTy *CI) : I(CI, true) { /*assert(CI);*/ } + CallSiteBase(InvokeTy *II) : I(II, false) { /*assert(II);*/ } CallSiteBase(ValTy *II) { *this = get(II); } CallSiteBase(InstrTy *II) { assert(II && "Null instruction given?"); *this = get(II); - assert(I.getPointer()); } /// CallSiteBase::get - This static method is sort of like a constructor. It @@ -66,9 +65,9 @@ public: static CallSiteBase get(ValTy *V) { if (InstrTy *II = dyn_cast(V)) { if (II->getOpcode() == Instruction::Call) - return CallSiteBase(reinterpret_cast(II)); + return CallSiteBase(static_cast(II)); else if (II->getOpcode() == Instruction::Invoke) - return CallSiteBase(reinterpret_cast(II)); + return CallSiteBase(static_cast(II)); } return CallSiteBase(); }