diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-10 23:55:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-10 23:55:11 +0000 |
commit | 42382d3e37d3e110cabac876fb081b1358489649 (patch) | |
tree | 701e20dcb0056d439aa9dbf888153d2445396441 /include | |
parent | bc1fd917f09c1ef295231d88a80874689de2ff7f (diff) | |
download | llvm-42382d3e37d3e110cabac876fb081b1358489649.tar.gz llvm-42382d3e37d3e110cabac876fb081b1358489649.tar.bz2 llvm-42382d3e37d3e110cabac876fb081b1358489649.tar.xz |
Remove lazy-initialization of section caches in MCContext
This seems to have been a cargo-culted habit from the very first such
cache which didn't have any specific justification (but might've been a
layering constraint at the time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCContext.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h index ea0217693d..1f90a2273c 100644 --- a/include/llvm/MC/MCContext.h +++ b/include/llvm/MC/MCContext.h @@ -155,7 +155,11 @@ namespace llvm { /// The Compile Unit ID that we are currently processing. unsigned DwarfCompileUnitID; - void *MachOUniquingMap, *ELFUniquingMap, *COFFUniquingMap; + typedef std::pair<std::string, std::string> SectionGroupPair; + + StringMap<const MCSectionMachO*> MachOUniquingMap; + std::map<SectionGroupPair, const MCSectionELF *> ELFUniquingMap; + std::map<SectionGroupPair, const MCSectionCOFF *> COFFUniquingMap; /// Do automatic reset in destructor bool AutoReset; |