summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-29 19:21:20 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-29 19:21:20 +0000
commit3ad660a5155108208fbd3483e37f199b52c1eb27 (patch)
tree9e21badca4d2e321533212eac3f7433072359e8f /llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
parenta332978b2ab53306acdef10858c7e954e605ab37 (diff)
downloadbcm5719-llvm-3ad660a5155108208fbd3483e37f199b52c1eb27.tar.gz
bcm5719-llvm-3ad660a5155108208fbd3483e37f199b52c1eb27.zip
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. llvm-svn: 205114
Diffstat (limited to 'llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp b/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
index d01108d259d..d0aa6af9c0c 100644
--- a/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
+++ b/llvm/lib/Target/ARM64/ARM64AsmPrinter.cpp
@@ -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();
}
}
OpenPOWER on IntegriCloud