diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-03-10 22:34:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-03-10 22:34:10 +0000 |
commit | cebae36f57456fe6b0e13726acd1e0250654f02d (patch) | |
tree | 47f8ec392dad6828e226a9e33efa850b4491893c /lib/CodeGen/MachineModuleInfoImpls.cpp | |
parent | bfdf7f38523bd38ae0538861a2bfd8bdc46e5c33 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfoImpls.cpp')
-rw-r--r-- | lib/CodeGen/MachineModuleInfoImpls.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineModuleInfoImpls.cpp b/lib/CodeGen/MachineModuleInfoImpls.cpp index 39d2c7504f..5ab56c09f5 100644 --- a/lib/CodeGen/MachineModuleInfoImpls.cpp +++ b/lib/CodeGen/MachineModuleInfoImpls.cpp @@ -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()) |