[llvm-commits] [llvm] r62282 - in /llvm/trunk: lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp test/CodeGen/Alpha/private.ll
Rafael Espindola
rafael.espindola at gmail.com
Thu Jan 15 13:51:46 PST 2009
Author: rafael
Date: Thu Jan 15 15:51:46 2009
New Revision: 62282
URL: http://llvm.org/viewvc/llvm-project?rev=62282&view=rev
Log:
Fix Alpha test and support for private linkage.
Modified:
llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
llvm/trunk/test/CodeGen/Alpha/private.ll
Modified: llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp?rev=62282&r1=62281&r2=62282&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp Thu Jan 15 15:51:46 2009
@@ -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!");
Modified: llvm/trunk/test/CodeGen/Alpha/private.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Alpha/private.ll?rev=62282&r1=62281&r2=62282&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Alpha/private.ll (original)
+++ llvm/trunk/test/CodeGen/Alpha/private.ll Thu Jan 15 15:51:46 2009
@@ -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()
More information about the llvm-commits
mailing list