summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-27 21:46:11 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-27 21:46:11 +0000
commit63f55c49f29350e34a04482f7c2f1f15ee31d905 (patch)
tree428d2072c3a0b6130d49ea6695d2988f708f86b3
parent7ea3501bd8cbed67603dd5430c22ab7978ad729a (diff)
downloadbcm5719-llvm-63f55c49f29350e34a04482f7c2f1f15ee31d905.tar.gz
bcm5719-llvm-63f55c49f29350e34a04482f7c2f1f15ee31d905.zip
remove bogus assert, use static_cast for additional checking
left two new asserts commented out, because they would fire in clang, have to hunt those down first llvm-svn: 109544
-rw-r--r--llvm/include/llvm/Support/CallSite.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/CallSite.h b/llvm/include/llvm/Support/CallSite.h
index cce000d87e1..d21c6ca5757 100644
--- a/llvm/include/llvm/Support/CallSite.h
+++ b/llvm/include/llvm/Support/CallSite.h
@@ -49,13 +49,12 @@ protected:
PointerIntPair<InstrTy*, 1, bool> I;
public:
CallSiteBase() : I(0, false) {}
- CallSiteBase(CallTy *CI) : I(reinterpret_cast<InstrTy*>(CI), true) {}
- CallSiteBase(InvokeTy *II) : I(reinterpret_cast<InstrTy*>(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<InstrTy>(V)) {
if (II->getOpcode() == Instruction::Call)
- return CallSiteBase(reinterpret_cast<CallTy*>(II));
+ return CallSiteBase(static_cast<CallTy*>(II));
else if (II->getOpcode() == Instruction::Invoke)
- return CallSiteBase(reinterpret_cast<InvokeTy*>(II));
+ return CallSiteBase(static_cast<InvokeTy*>(II));
}
return CallSiteBase();
}
OpenPOWER on IntegriCloud