Add a bit along with the MCSymbols stored in the MachineModuleInfo maps that

indicates that an MCSymbol is external or not. (It's true if it's external.)
This will be used to specify the correct information to add to non-lazy
pointers. That will be explained further when this bit is used.

llvm-svn: 98199
This commit is contained in:
Bill Wendling
2010-03-10 22:34:10 +00:00
parent 0d0b588fb2
commit a810bdfcca
8 changed files with 140 additions and 98 deletions

View File

@@ -25,10 +25,9 @@ void MachineModuleInfoMachO::Anchor() {}
void MachineModuleInfoELF::Anchor() {}
static int SortSymbolPair(const void *LHS, const void *RHS) {
const MCSymbol *LHSS =
((const std::pair<MCSymbol*, MCSymbol*>*)LHS)->first;
const MCSymbol *RHSS =
((const std::pair<MCSymbol*, MCSymbol*>*)RHS)->first;
typedef std::pair<MCSymbol*, MachineModuleInfoImpl::StubValueTy> PairTy;
const MCSymbol *LHSS = ((const PairTy *)LHS)->first;
const MCSymbol *RHSS = ((const PairTy *)RHS)->first;
return LHSS->getName().compare(RHSS->getName());
}
@@ -36,7 +35,7 @@ static int SortSymbolPair(const void *LHS, const void *RHS) {
/// sorted orer.
MachineModuleInfoImpl::SymbolListTy
MachineModuleInfoImpl::GetSortedStubs(const DenseMap<MCSymbol*,
MCSymbol*> &Map) {
MachineModuleInfoImpl::StubValueTy>&Map) {
MachineModuleInfoImpl::SymbolListTy List(Map.begin(), Map.end());
if (!List.empty())