diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-10 02:25:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-10 02:25:11 +0000 |
commit | 98cdab53c302a2d6686fa428c0e896b1fb195311 (patch) | |
tree | 6a81e5db3dfa87703b667b33ac4a8eac94c5a1dc /lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 2d0a91cd6c3df32014d547255d6a615bd1bc84fb (diff) |
set the temporary bit on MCSymbols correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index d127f53a4e..6916831754 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -403,12 +403,15 @@ getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang, // Add information about the stub reference to ELFMMI so that the stub // gets emitted by the asmprinter. - MCSymbol *Sym = getContext().GetOrCreateSymbol(Name.str()); + MCSymbol *Sym = getContext().GetOrCreateTemporarySymbol(Name.str()); MCSymbol *&StubSym = ELFMMI.getGVStubEntry(Sym); if (StubSym == 0) { Name.clear(); Mang->getNameWithPrefix(Name, GV, false); - StubSym = getContext().GetOrCreateSymbol(Name.str()); + if (GV->hasPrivateLinkage()) + StubSym = getContext().GetOrCreateTemporarySymbol(Name.str()); + else + StubSym = getContext().GetOrCreateSymbol(Name.str()); } return TargetLoweringObjectFile:: @@ -749,12 +752,15 @@ getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang, // Add information about the stub reference to MachOMMI so that the stub // gets emitted by the asmprinter. - MCSymbol *Sym = getContext().GetOrCreateSymbol(Name.str()); + MCSymbol *Sym = getContext().GetOrCreateTemporarySymbol(Name.str()); MCSymbol *&StubSym = MachOMMI.getGVStubEntry(Sym); if (StubSym == 0) { Name.clear(); Mang->getNameWithPrefix(Name, GV, false); - StubSym = getContext().GetOrCreateSymbol(Name.str()); + if (GV->hasPrivateLinkage()) + StubSym = getContext().GetOrCreateTemporarySymbol(Name.str()); + else + StubSym = getContext().GetOrCreateSymbol(Name.str()); } return TargetLoweringObjectFile:: |