From d269a6e460a71a6c5c361a26c56c91fdb9486f45 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 3 Feb 2010 06:18:30 +0000 Subject: make MachineModuleInfoMachO hold non-const MCSymbol*'s instead of const ones. non-const ones aren't very useful, because you can't even, say, emit them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95205 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineModuleInfoImpls.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'include/llvm/CodeGen/MachineModuleInfoImpls.h') diff --git a/include/llvm/CodeGen/MachineModuleInfoImpls.h b/include/llvm/CodeGen/MachineModuleInfoImpls.h index 44813cbdcd..66799904bd 100644 --- a/include/llvm/CodeGen/MachineModuleInfoImpls.h +++ b/include/llvm/CodeGen/MachineModuleInfoImpls.h @@ -25,39 +25,38 @@ namespace llvm { class MachineModuleInfoMachO : public MachineModuleInfoImpl { /// FnStubs - Darwin '$stub' stubs. The key is something like "Lfoo$stub", /// the value is something like "_foo". - DenseMap FnStubs; + DenseMap FnStubs; /// GVStubs - Darwin '$non_lazy_ptr' stubs. The key is something like /// "Lfoo$non_lazy_ptr", the value is something like "_foo". - DenseMap GVStubs; + DenseMap GVStubs; /// HiddenGVStubs - Darwin '$non_lazy_ptr' stubs. The key is something like /// "Lfoo$non_lazy_ptr", the value is something like "_foo". Unlike GVStubs /// these are for things with hidden visibility. - DenseMap HiddenGVStubs; + DenseMap HiddenGVStubs; virtual void Anchor(); // Out of line virtual method. public: MachineModuleInfoMachO(const MachineModuleInfo &) {} - const MCSymbol *&getFnStubEntry(const MCSymbol *Sym) { + MCSymbol *&getFnStubEntry(MCSymbol *Sym) { assert(Sym && "Key cannot be null"); return FnStubs[Sym]; } - const MCSymbol *&getGVStubEntry(const MCSymbol *Sym) { + MCSymbol *&getGVStubEntry(MCSymbol *Sym) { assert(Sym && "Key cannot be null"); return GVStubs[Sym]; } - const MCSymbol *&getHiddenGVStubEntry(const MCSymbol *Sym) { + MCSymbol *&getHiddenGVStubEntry(MCSymbol *Sym) { assert(Sym && "Key cannot be null"); return HiddenGVStubs[Sym]; } /// Accessor methods to return the set of stubs in sorted order. - typedef std::vector > - SymbolListTy; + typedef std::vector > SymbolListTy; SymbolListTy GetFnStubList() const { return GetSortedStubs(FnStubs); @@ -71,7 +70,7 @@ namespace llvm { private: static SymbolListTy - GetSortedStubs(const DenseMap &Map); + GetSortedStubs(const DenseMap &Map); }; } // end namespace llvm -- cgit v1.2.3