mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Constify subtarget info properly so that we dont cast away the const in
the SubtargetInfoKV tables. Found by gcc48 -Wcast-qual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163251 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -70,7 +70,7 @@ uint64_t MCSubtargetInfo::ToggleFeature(StringRef FS) {
|
||||
}
|
||||
|
||||
|
||||
MCSchedModel *
|
||||
const MCSchedModel *
|
||||
MCSubtargetInfo::getSchedModelForCPU(StringRef CPU) const {
|
||||
assert(ProcSchedModel && "Processor machine model not available!");
|
||||
|
||||
@@ -93,11 +93,11 @@ MCSubtargetInfo::getSchedModelForCPU(StringRef CPU) const {
|
||||
return &MCSchedModel::DefaultSchedModel;
|
||||
}
|
||||
assert(Found->Value && "Missing processor SchedModel value");
|
||||
return (MCSchedModel *)Found->Value;
|
||||
return (const MCSchedModel *)Found->Value;
|
||||
}
|
||||
|
||||
InstrItineraryData
|
||||
MCSubtargetInfo::getInstrItineraryForCPU(StringRef CPU) const {
|
||||
MCSchedModel *SchedModel = getSchedModelForCPU(CPU);
|
||||
const MCSchedModel *SchedModel = getSchedModelForCPU(CPU);
|
||||
return InstrItineraryData(SchedModel, Stages, OperandCycles, ForwardingPaths);
|
||||
}
|
||||
|
Reference in New Issue
Block a user