mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts * Abstract base classes should have virtual destructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -32,8 +32,8 @@ class CallSite {
|
||||
Instruction *I;
|
||||
public:
|
||||
CallSite() : I(0) {}
|
||||
CallSite(CallInst *CI) : I((Instruction*)CI) {}
|
||||
CallSite(InvokeInst *II) : I((Instruction*)II) {}
|
||||
CallSite(CallInst *CI) : I(reinterpret_cast<Instruction*>(CI)) {}
|
||||
CallSite(InvokeInst *II) : I(reinterpret_cast<Instruction*>(II)) {}
|
||||
CallSite(const CallSite &CS) : I(CS.I) {}
|
||||
CallSite &operator=(const CallSite &CS) { I = CS.I; return *this; }
|
||||
|
||||
@ -45,9 +45,9 @@ public:
|
||||
static CallSite get(Value *V) {
|
||||
if (Instruction *I = dyn_cast<Instruction>(V)) {
|
||||
if (I->getOpcode() == Instruction::Call)
|
||||
return CallSite((CallInst*)I);
|
||||
return CallSite(reinterpret_cast<CallInst*>(I));
|
||||
else if (I->getOpcode() == Instruction::Invoke)
|
||||
return CallSite((InvokeInst*)I);
|
||||
return CallSite(reinterpret_cast<InvokeInst*>(I));
|
||||
}
|
||||
return CallSite();
|
||||
}
|
||||
|
Reference in New Issue
Block a user