mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
Get rid of a couple of dynamic_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8014e86580
commit
a044dfcb5a
@ -486,6 +486,12 @@ namespace {
|
|||||||
delete MemMgr;
|
delete MemMgr;
|
||||||
if (ExceptionHandling) delete DE;
|
if (ExceptionHandling) delete DE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// classof - Methods for support type inquiry through isa, cast, and
|
||||||
|
/// dyn_cast:
|
||||||
|
///
|
||||||
|
static inline bool classof(const JITEmitter*) { return true; }
|
||||||
|
static inline bool classof(const MachineCodeEmitter*) { return true; }
|
||||||
|
|
||||||
JITResolver &getJITResolver() { return Resolver; }
|
JITResolver &getJITResolver() { return Resolver; }
|
||||||
|
|
||||||
@ -1129,8 +1135,8 @@ void *JIT::getPointerToFunctionOrStub(Function *F) {
|
|||||||
return Addr;
|
return Addr;
|
||||||
|
|
||||||
// Get a stub if the target supports it.
|
// Get a stub if the target supports it.
|
||||||
assert(dynamic_cast<JITEmitter*>(MCE) && "Unexpected MCE?");
|
assert(isa<JITEmitter>(MCE) && "Unexpected MCE?");
|
||||||
JITEmitter *JE = static_cast<JITEmitter*>(getCodeEmitter());
|
JITEmitter *JE = cast<JITEmitter>(getCodeEmitter());
|
||||||
return JE->getJITResolver().getFunctionStub(F);
|
return JE->getJITResolver().getFunctionStub(F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1146,7 +1152,7 @@ void JIT::freeMachineCodeForFunction(Function *F) {
|
|||||||
RemoveFunctionFromSymbolTable(OldPtr);
|
RemoveFunctionFromSymbolTable(OldPtr);
|
||||||
|
|
||||||
// Free the actual memory for the function body and related stuff.
|
// Free the actual memory for the function body and related stuff.
|
||||||
assert(dynamic_cast<JITEmitter*>(MCE) && "Unexpected MCE?");
|
assert(isa<JITEmitter>(MCE) && "Unexpected MCE?");
|
||||||
static_cast<JITEmitter*>(MCE)->deallocateMemForFunction(F);
|
cast<JITEmitter>(MCE)->deallocateMemForFunction(F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user