Private linkage support for PPC / Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62955 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2009-01-25 06:32:01 +00:00
parent d498c8f2c8
commit 1902a129a5
2 changed files with 7 additions and 0 deletions

View File

@ -776,6 +776,7 @@ bool PPCDarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
switch (F->getLinkage()) {
default: assert(0 && "Unknown linkage type!");
case Function::PrivateLinkage:
case Function::InternalLinkage: // Symbols default to internal.
break;
case Function::ExternalLinkage:
@ -959,6 +960,7 @@ void PPCDarwinAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
O << "\t.globl " << name << '\n';
// FALL THROUGH
case GlobalValue::InternalLinkage:
case GlobalValue::PrivateLinkage:
break;
default:
cerr << "Unknown linkage type!";

View File

@ -5,6 +5,11 @@
; RUN: grep bl.*\.Lfoo %t
; RUN: grep .Lbaz: %t
; RUN: grep lis.*\.Lbaz %t
; RUN: llvm-as < %s | llc -mtriple=powerpc-apple-darwin > %t
; RUN: grep L_foo: %t
; RUN: grep bl.*\L_foo %t
; RUN: grep L_baz: %t
; RUN: grep lis.*\L_baz %t
declare void @foo()