mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Add two small structs for readability in place of std::pair and std::tuple. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -162,12 +162,38 @@ namespace llvm {
|
||||
/// The Compile Unit ID that we are currently processing.
|
||||
unsigned DwarfCompileUnitID;
|
||||
|
||||
typedef std::pair<std::string, std::string> SectionGroupPair;
|
||||
typedef std::tuple<std::string, std::string, int> SectionGroupTriple;
|
||||
struct ELFSectionKey {
|
||||
std::string SectionName;
|
||||
std::string GroupName;
|
||||
ELFSectionKey(StringRef SectionName, StringRef GroupName)
|
||||
: SectionName(SectionName), GroupName(GroupName) {}
|
||||
bool operator<(const ELFSectionKey &Other) const {
|
||||
if (SectionName < Other.SectionName)
|
||||
return true;
|
||||
return GroupName < Other.GroupName;
|
||||
}
|
||||
};
|
||||
|
||||
struct COFFSectionKey {
|
||||
std::string SectionName;
|
||||
std::string GroupName;
|
||||
int SelectionKey;
|
||||
COFFSectionKey(StringRef SectionName, StringRef GroupName,
|
||||
int SelectionKey)
|
||||
: SectionName(SectionName), GroupName(GroupName),
|
||||
SelectionKey(SelectionKey) {}
|
||||
bool operator<(const COFFSectionKey &Other) const {
|
||||
if (SectionName < Other.SectionName)
|
||||
return true;
|
||||
if (GroupName < Other.GroupName)
|
||||
return GroupName < Other.GroupName;
|
||||
return SelectionKey < Other.SelectionKey;
|
||||
}
|
||||
};
|
||||
|
||||
StringMap<const MCSectionMachO*> MachOUniquingMap;
|
||||
std::map<SectionGroupPair, const MCSectionELF *> ELFUniquingMap;
|
||||
std::map<SectionGroupTriple, const MCSectionCOFF *> COFFUniquingMap;
|
||||
std::map<ELFSectionKey, const MCSectionELF *> ELFUniquingMap;
|
||||
std::map<COFFSectionKey, const MCSectionCOFF *> COFFUniquingMap;
|
||||
|
||||
/// Do automatic reset in destructor
|
||||
bool AutoReset;
|
||||
|
Reference in New Issue
Block a user