summaryrefslogtreecommitdiffstats
path: root/lld/ELF
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF')
-rw-r--r--lld/ELF/LinkerScript.h2
-rw-r--r--lld/ELF/ScriptParser.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 478405d463f..ba9e87720f7 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -277,7 +277,7 @@ public:
std::vector<InputSectionDescription *> KeptSections;
// A map from memory region name to a memory region descriptor.
- llvm::DenseMap<llvm::StringRef, MemoryRegion *> MemoryRegions;
+ llvm::MapVector<llvm::StringRef, MemoryRegion *> MemoryRegions;
// A list of symbols referenced by the script.
std::vector<llvm::StringRef> ReferencedSymbols;
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index 7ec61226d7e..af9bf1994b4 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -422,7 +422,7 @@ void ScriptParser::readRegionAlias() {
setError("redefinition of memory region '" + Alias + "'");
if (!Script->MemoryRegions.count(Name))
setError("memory region '" + Name + "' is not defined");
- Script->MemoryRegions[Alias] = Script->MemoryRegions[Name];
+ Script->MemoryRegions.insert({Alias, Script->MemoryRegions[Name]});
}
void ScriptParser::readSearchDir() {
OpenPOWER on IntegriCloud