summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-03-10 22:34:10 +0000
committerBill Wendling <isanbard@gmail.com>2010-03-10 22:34:10 +0000
commita810bdfccae99fd62f2610d3cee9c36870a880da (patch)
tree27515bcd71779515dc477c39dd762f3a3145e680 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent0d0b588fb2551cdb8d5e9350063a25eb63dbd41b (diff)
downloadbcm5719-llvm-a810bdfccae99fd62f2610d3cee9c36870a880da.tar.gz
bcm5719-llvm-a810bdfccae99fd62f2610d3cee9c36870a880da.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 2014b429bd9..169e2cae1f8 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -404,14 +404,19 @@ 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().GetOrCreateTemporarySymbol(Name.str());
- MCSymbol *&StubSym = ELFMMI.getGVStubEntry(Sym);
- if (StubSym == 0) {
+ MachineModuleInfoImpl::StubValueTy &StubSym = ELFMMI.getGVStubEntry(Sym);
+ if (StubSym.getPointer() == 0) {
Name.clear();
Mang->getNameWithPrefix(Name, GV, false);
+
if (GV->hasPrivateLinkage())
- StubSym = getContext().GetOrCreateTemporarySymbol(Name.str());
+ StubSym = MachineModuleInfoImpl::
+ StubValueTy(getContext().GetOrCreateTemporarySymbol(Name.str()),
+ false);
else
- StubSym = getContext().GetOrCreateSymbol(Name.str());
+ StubSym = MachineModuleInfoImpl::
+ StubValueTy(getContext().GetOrCreateSymbol(Name.str()),
+ !GV->hasInternalLinkage());
}
return TargetLoweringObjectFile::
@@ -761,14 +766,19 @@ 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().GetOrCreateTemporarySymbol(Name.str());
- MCSymbol *&StubSym = MachOMMI.getGVStubEntry(Sym);
- if (StubSym == 0) {
+ MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(Sym);
+ if (StubSym.getPointer() == 0) {
Name.clear();
Mang->getNameWithPrefix(Name, GV, false);
+
if (GV->hasPrivateLinkage())
- StubSym = getContext().GetOrCreateTemporarySymbol(Name.str());
+ StubSym = MachineModuleInfoImpl::
+ StubValueTy(getContext().GetOrCreateTemporarySymbol(Name.str()),
+ false);
else
- StubSym = getContext().GetOrCreateSymbol(Name.str());
+ StubSym = MachineModuleInfoImpl::
+ StubValueTy(getContext().GetOrCreateSymbol(Name.str()),
+ !GV->hasInternalLinkage());
}
return TargetLoweringObjectFile::
OpenPOWER on IntegriCloud