From 204b0c2ca06d451479a62aeca4822f8e1a942ccf Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 5 Dec 2006 17:00:17 +0000 Subject: [PATCH] add support for weak linkage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32222 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMAsmPrinter.cpp | 2 +- test/CodeGen/ARM/weak.ll | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/CodeGen/ARM/weak.ll diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 51a0f883d2d..ba5cdb19401 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -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); diff --git a/test/CodeGen/ARM/weak.ll b/test/CodeGen/ARM/weak.ll new file mode 100644 index 00000000000..682da8c42bb --- /dev/null +++ b/test/CodeGen/ARM/weak.ll @@ -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 +} -- 2.34.1