aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2009-01-15 20:18:42 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2009-01-15 20:18:42 +0000
commita168fc98dedfc8cac01c34f84b699fe5f48ad76d (patch)
treeebdd7fc62b19bc9bdb7cc03563fd817d3943f17e /lib/Target/ARM
parentef4bf3b063ea20732c4647c6f2d5d77caf907578 (diff)
downloadexternal_llvm-a168fc98dedfc8cac01c34f84b699fe5f48ad76d.zip
external_llvm-a168fc98dedfc8cac01c34f84b699fe5f48ad76d.tar.gz
external_llvm-a168fc98dedfc8cac01c34f84b699fe5f48ad76d.tar.bz2
Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/ARMISelLowering.cpp2
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index 7bef576..eda6ff4 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -808,7 +808,7 @@ SDValue ARMTargetLowering::LowerGlobalAddressELF(SDValue Op,
GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
Reloc::Model RelocM = getTargetMachine().getRelocationModel();
if (RelocM == Reloc::PIC_) {
- bool UseGOTOFF = GV->hasInternalLinkage() || GV->hasHiddenVisibility();
+ bool UseGOTOFF = GV->hasLocalLinkage() || GV->hasHiddenVisibility();
ARMConstantPoolValue *CPV =
new ARMConstantPoolValue(GV, ARMCP::CPValue, UseGOTOFF ? "GOTOFF":"GOT");
SDValue CPAddr = DAG.getTargetConstantPool(CPV, PtrVT, 2);
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index 40153dc..12e1346 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -197,6 +197,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
const Function *F = MF.getFunction();
switch (F->getLinkage()) {
default: assert(0 && "Unknown linkage type!");
+ case Function::PrivateLinkage:
case Function::InternalLinkage:
SwitchToTextSection("\t.text", F);
break;
@@ -847,11 +848,11 @@ void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
}
}
- if (GVar->hasInternalLinkage() || GVar->mayBeOverridden()) {
+ if (GVar->hasLocalLinkage() || GVar->mayBeOverridden()) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (isDarwin) {
- if (GVar->hasInternalLinkage()) {
+ if (GVar->hasLocalLinkage()) {
O << TAI->getLCOMMDirective() << name << "," << Size
<< ',' << Align;
} else if (GVar->hasCommonLinkage()) {
@@ -869,7 +870,7 @@ void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
return;
}
} else if (TAI->getLCOMMDirective() != NULL) {
- if (GVar->hasInternalLinkage()) {
+ if (GVar->hasLocalLinkage()) {
O << TAI->getLCOMMDirective() << name << "," << Size;
} else {
O << TAI->getCOMMDirective() << name << "," << Size;
@@ -878,7 +879,7 @@ void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
}
} else {
SwitchToSection(TAI->SectionForGlobal(GVar));
- if (GVar->hasInternalLinkage())
+ if (GVar->hasLocalLinkage())
O << "\t.local\t" << name << "\n";
O << TAI->getCOMMDirective() << name << "," << Size;
if (TAI->getCOMMDirectiveTakesAlignment())
@@ -909,6 +910,7 @@ void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
case GlobalValue::ExternalLinkage:
O << "\t.globl " << name << "\n";
// FALL THROUGH
+ case GlobalValue::PrivateLinkage:
case GlobalValue::InternalLinkage:
break;
default: