mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Detemplatize LOHDirective.
The ARM64 backend uses it only as a container to keep an MCLOHType and Arguments around so give it its own little copy. The other functionality isn't used and we had a crazy method specialization hack in place to keep it working. Unfortunately that was incompatible with MSVC. Also range-ify a couple of loops while at it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205114 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -135,26 +135,16 @@ ARM64AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
|
||||
}
|
||||
|
||||
void ARM64AsmPrinter::EmitLOHs() {
|
||||
const ARM64FunctionInfo::MILOHDirectives &LOHs =
|
||||
const_cast<const ARM64FunctionInfo *>(ARM64FI)
|
||||
->getLOHContainer()
|
||||
.getDirectives();
|
||||
SmallVector<MCSymbol *, 3> MCArgs;
|
||||
|
||||
for (ARM64FunctionInfo::MILOHDirectives::const_iterator It = LOHs.begin(),
|
||||
EndIt = LOHs.end();
|
||||
It != EndIt; ++It) {
|
||||
const ARM64FunctionInfo::MILOHArgs &MIArgs = It->getArgs();
|
||||
for (ARM64FunctionInfo::MILOHArgs::const_iterator
|
||||
MIArgsIt = MIArgs.begin(),
|
||||
EndMIArgsIt = MIArgs.end();
|
||||
MIArgsIt != EndMIArgsIt; ++MIArgsIt) {
|
||||
MInstToMCSymbol::iterator LabelIt = LOHInstToLabel.find(*MIArgsIt);
|
||||
for (const auto &D : ARM64FI->getLOHContainer()) {
|
||||
for (const MachineInstr *MI : D.getArgs()) {
|
||||
MInstToMCSymbol::iterator LabelIt = LOHInstToLabel.find(MI);
|
||||
assert(LabelIt != LOHInstToLabel.end() &&
|
||||
"Label hasn't been inserted for LOH related instruction");
|
||||
MCArgs.push_back(LabelIt->second);
|
||||
}
|
||||
OutStreamer.EmitLOHDirective(It->getKind(), MCArgs);
|
||||
OutStreamer.EmitLOHDirective(D.getKind(), MCArgs);
|
||||
MCArgs.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user