projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mips][PR19612] Fix va_arg for big-endian mode.
[oota-llvm.git]
/
lib
/
MC
/
MCContext.cpp
diff --git
a/lib/MC/MCContext.cpp
b/lib/MC/MCContext.cpp
index bd2c4e960ac475b56139617c87ba2db0f615b69f..7702da3540ca56b1a28a895c6ae657a4dc3eee42 100644
(file)
--- a/
lib/MC/MCContext.cpp
+++ b/
lib/MC/MCContext.cpp
@@
-47,8
+47,9
@@
MCContext::MCContext(const MCAsmInfo *mai, const MCRegisterInfo *mri,
SecureLog = nullptr;
SecureLogUsed = false;
SecureLog = nullptr;
SecureLogUsed = false;
- if (SrcMgr && SrcMgr->getNumBuffers() > 0)
- MainFileName = SrcMgr->getMemoryBuffer(0)->getBufferIdentifier();
+ if (SrcMgr && SrcMgr->getNumBuffers())
+ MainFileName =
+ SrcMgr->getMemoryBuffer(SrcMgr->getMainFileID())->getBufferIdentifier();
}
MCContext::~MCContext() {
}
MCContext::~MCContext() {
@@
-284,17
+285,17
@@
const MCSectionCOFF *MCContext::getCOFFSection(StringRef Section,
int Selection) {
// Do the lookup, if we have a hit, return it.
int Selection) {
// Do the lookup, if we have a hit, return it.
- SectionGroup
Pair P(Section, COMDATSymName
);
- auto IterBool = COFFUniquingMap.insert(std::make_pair(
P
, nullptr));
+ SectionGroup
Triple T(Section, COMDATSymName, Selection
);
+ auto IterBool = COFFUniquingMap.insert(std::make_pair(
T
, nullptr));
auto Iter = IterBool.first;
if (!IterBool.second)
return Iter->second;
auto Iter = IterBool.first;
if (!IterBool.second)
return Iter->second;
-
const
MCSymbol *COMDATSymbol = nullptr;
+ MCSymbol *COMDATSymbol = nullptr;
if (!COMDATSymName.empty())
COMDATSymbol = GetOrCreateSymbol(COMDATSymName);
if (!COMDATSymName.empty())
COMDATSymbol = GetOrCreateSymbol(COMDATSymName);
- StringRef CachedName =
Iter->first.first
;
+ StringRef CachedName =
std::get<0>(Iter->first)
;
MCSectionCOFF *Result = new (*this)
MCSectionCOFF(CachedName, Characteristics, COMDATSymbol, Selection, Kind);
MCSectionCOFF *Result = new (*this)
MCSectionCOFF(CachedName, Characteristics, COMDATSymbol, Selection, Kind);
@@
-309,8
+310,8
@@
MCContext::getCOFFSection(StringRef Section, unsigned Characteristics,
}
const MCSectionCOFF *MCContext::getCOFFSection(StringRef Section) {
}
const MCSectionCOFF *MCContext::getCOFFSection(StringRef Section) {
- SectionGroup
Pair P(Section, ""
);
- auto Iter = COFFUniquingMap.find(
P
);
+ SectionGroup
Triple T(Section, "", 0
);
+ auto Iter = COFFUniquingMap.find(
T
);
if (Iter == COFFUniquingMap.end())
return nullptr;
return Iter->second;
if (Iter == COFFUniquingMap.end())
return nullptr;
return Iter->second;