summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index 62877870395..42c94091b9e 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -1762,7 +1762,10 @@ void HexagonFrameLowering::optimizeSpillSlots(MachineFunction &MF,
// and collect relevant information.
for (auto &B : MF) {
std::map<int,IndexType> LastStore, LastLoad;
- auto P = BlockIndexes.emplace(&B, HexagonBlockRanges::InstrIndexMap(B));
+ // Emplace appears not to be supported in gcc 4.7.2-4.
+ //auto P = BlockIndexes.emplace(&B, HexagonBlockRanges::InstrIndexMap(B));
+ auto TmpP = std::make_pair(&B, HexagonBlockRanges::InstrIndexMap(B));
+ auto P = BlockIndexes.insert(TmpP);
auto &IndexMap = P.first->second;
DEBUG(dbgs() << "Index map for BB#" << B.getNumber() << "\n"
<< IndexMap << '\n');
OpenPOWER on IntegriCloud