Fix Alpha test and support for private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62282 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
index b2e63e6..b2b8fcd 100644
--- a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
+++ b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
@@ -155,6 +155,7 @@
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 @@
O << "\t.ent " << CurrentFnName << "\n";
- assert (!F->hasPrivateLinkage() && "add private prefix.");
O << CurrentFnName << ":\n";
// Print out code for the function.
@@ -238,6 +238,7 @@
O << TAI->getGlobalDirective() << name << "\n";
break;
case GlobalValue::InternalLinkage:
+ case GlobalValue::PrivateLinkage:
break;
default:
assert(0 && "Unknown linkage type!");
diff --git a/test/CodeGen/Alpha/private.ll b/test/CodeGen/Alpha/private.ll
index 8bb8253..2d9ed1e 100644
--- a/test/CodeGen/Alpha/private.ll
+++ b/test/CodeGen/Alpha/private.ll
@@ -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()