add support for weak linkage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2006-12-05 17:00:17 +00:00
parent eae6ce5df4
commit 204b0c2ca0
2 changed files with 10 additions and 1 deletions

View File

@ -128,7 +128,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
break;
case Function::WeakLinkage:
case Function::LinkOnceLinkage:
assert(0 && "Not implemented");
O << "\t.weak\t" << CurrentFnName << "\n";
break;
}
EmitAlignment(2, F);

9
test/CodeGen/ARM/weak.ll Normal file
View File

@ -0,0 +1,9 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep .weak
implementation ; Functions:
weak uint %f() {
entry:
unreachable
}