mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 02:32:08 +00:00
Cleanup compiler warnings on discarding type qualifiers in casts. Switch to C++ style casts.
Patch by Saleem Abdulrasool! Differential Revision: http://llvm-reviews.chandlerc.com/D204 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70fe6ecb6d
commit
4e23ebe766
@ -371,12 +371,16 @@ FunctionPass *llvm::createARMJITCodeEmitterPass(ARMBaseTargetMachine &TM,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ARMCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
|
bool ARMCodeEmitter::runOnMachineFunction(MachineFunction &MF) {
|
||||||
assert((MF.getTarget().getRelocationModel() != Reloc::Default ||
|
TargetMachine &Target = const_cast<TargetMachine&>(MF.getTarget());
|
||||||
MF.getTarget().getRelocationModel() != Reloc::Static) &&
|
|
||||||
|
assert((Target.getRelocationModel() != Reloc::Default ||
|
||||||
|
Target.getRelocationModel() != Reloc::Static) &&
|
||||||
"JIT relocation model must be set to static or default!");
|
"JIT relocation model must be set to static or default!");
|
||||||
JTI = ((ARMBaseTargetMachine &)MF.getTarget()).getJITInfo();
|
|
||||||
II = (const ARMBaseInstrInfo *)MF.getTarget().getInstrInfo();
|
JTI = static_cast<ARMJITInfo*>(Target.getJITInfo());
|
||||||
TD = MF.getTarget().getDataLayout();
|
II = static_cast<const ARMBaseInstrInfo*>(Target.getInstrInfo());
|
||||||
|
TD = Target.getDataLayout();
|
||||||
|
|
||||||
Subtarget = &TM.getSubtarget<ARMSubtarget>();
|
Subtarget = &TM.getSubtarget<ARMSubtarget>();
|
||||||
MCPEs = &MF.getConstantPool()->getConstants();
|
MCPEs = &MF.getConstantPool()->getConstants();
|
||||||
MJTEs = 0;
|
MJTEs = 0;
|
||||||
|
@ -209,7 +209,7 @@ ARMConstantPoolSymbol::ARMConstantPoolSymbol(LLVMContext &C, const char *s,
|
|||||||
S(strdup(s)) {}
|
S(strdup(s)) {}
|
||||||
|
|
||||||
ARMConstantPoolSymbol::~ARMConstantPoolSymbol() {
|
ARMConstantPoolSymbol::~ARMConstantPoolSymbol() {
|
||||||
free((void*)S);
|
free(const_cast<void*>(reinterpret_cast<const void *>(S)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ARMConstantPoolSymbol *
|
ARMConstantPoolSymbol *
|
||||||
|
Loading…
Reference in New Issue
Block a user