forked from OSchip/llvm-project
Fix Alpha test and support for private linkage.
llvm-svn: 62282
This commit is contained in:
parent
ebfafee903
commit
f2831d6cd1
|
@ -155,6 +155,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||
switch (F->getLinkage()) {
|
||||
default: assert(0 && "Unknown linkage type!");
|
||||
case Function::InternalLinkage: // Symbols default to internal.
|
||||
case Function::PrivateLinkage:
|
||||
break;
|
||||
case Function::ExternalLinkage:
|
||||
O << "\t.globl " << CurrentFnName << "\n";
|
||||
|
@ -169,7 +170,6 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||
|
||||
O << "\t.ent " << CurrentFnName << "\n";
|
||||
|
||||
assert (!F->hasPrivateLinkage() && "add private prefix.");
|
||||
O << CurrentFnName << ":\n";
|
||||
|
||||
// Print out code for the function.
|
||||
|
@ -238,6 +238,7 @@ void AlphaAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
|
|||
O << TAI->getGlobalDirective() << name << "\n";
|
||||
break;
|
||||
case GlobalValue::InternalLinkage:
|
||||
case GlobalValue::PrivateLinkage:
|
||||
break;
|
||||
default:
|
||||
assert(0 && "Unknown linkage type!");
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
; Test to make sure that the 'private' is used correctly.
|
||||
;
|
||||
; RUN: llvm-as < %s | llc > %t
|
||||
; RUN: grep .Lfoo: %t
|
||||
; RUN: grep call.*\.Lfoo %t
|
||||
; RUN: grep .Lbaz: %t
|
||||
; RUN: grep movl.*\.Lbaz %t
|
||||
; RUN: llvm-as < %s | llc -march=alpha > %t
|
||||
; RUN: grep \\\$foo: %t
|
||||
; RUN: grep bsr.*\\\$\\\$foo %t
|
||||
; RUN: grep \\\$baz: %t
|
||||
; RUN: grep ldah.*\\\$baz %t
|
||||
|
||||
declare void @foo()
|
||||
|
||||
|
|
Loading…
Reference in New Issue