mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +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) {
|
||||
assert((MF.getTarget().getRelocationModel() != Reloc::Default ||
|
||||
MF.getTarget().getRelocationModel() != Reloc::Static) &&
|
||||
TargetMachine &Target = const_cast<TargetMachine&>(MF.getTarget());
|
||||
|
||||
assert((Target.getRelocationModel() != Reloc::Default ||
|
||||
Target.getRelocationModel() != Reloc::Static) &&
|
||||
"JIT relocation model must be set to static or default!");
|
||||
JTI = ((ARMBaseTargetMachine &)MF.getTarget()).getJITInfo();
|
||||
II = (const ARMBaseInstrInfo *)MF.getTarget().getInstrInfo();
|
||||
TD = MF.getTarget().getDataLayout();
|
||||
|
||||
JTI = static_cast<ARMJITInfo*>(Target.getJITInfo());
|
||||
II = static_cast<const ARMBaseInstrInfo*>(Target.getInstrInfo());
|
||||
TD = Target.getDataLayout();
|
||||
|
||||
Subtarget = &TM.getSubtarget<ARMSubtarget>();
|
||||
MCPEs = &MF.getConstantPool()->getConstants();
|
||||
MJTEs = 0;
|
||||
|
@ -209,7 +209,7 @@ ARMConstantPoolSymbol::ARMConstantPoolSymbol(LLVMContext &C, const char *s,
|
||||
S(strdup(s)) {}
|
||||
|
||||
ARMConstantPoolSymbol::~ARMConstantPoolSymbol() {
|
||||
free((void*)S);
|
||||
free(const_cast<void*>(reinterpret_cast<const void *>(S)));
|
||||
}
|
||||
|
||||
ARMConstantPoolSymbol *
|
||||
|
Loading…
Reference in New Issue
Block a user