From 3f49cbeb375383f1b55b41619cbbff4458eb1a96 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 25 May 2011 23:30:30 +0000 Subject: [PATCH] Define WeakRefDirective. llvm-svn: 132098 --- lib/Target/Mips/MipsMCAsmInfo.cpp | 1 + test/CodeGen/Mips/weak.ll | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test/CodeGen/Mips/weak.ll diff --git a/lib/Target/Mips/MipsMCAsmInfo.cpp b/lib/Target/Mips/MipsMCAsmInfo.cpp index fe48ab770e6..ca00463a98b 100644 --- a/lib/Target/Mips/MipsMCAsmInfo.cpp +++ b/lib/Target/Mips/MipsMCAsmInfo.cpp @@ -24,4 +24,5 @@ MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) { ZeroDirective = "\t.space\t"; GPRel32Directive = "\t.gpword\t"; HasSetDirective = false; + WeakRefDirective = "\t.weak\t"; } diff --git a/test/CodeGen/Mips/weak.ll b/test/CodeGen/Mips/weak.ll new file mode 100644 index 00000000000..09dd2a4ebbf --- /dev/null +++ b/test/CodeGen/Mips/weak.ll @@ -0,0 +1,12 @@ +; RUN: llc -march=mips < %s | FileCheck %s + +@t = common global i32 (...)* null, align 4 + +define void @f() nounwind { +entry: + store i32 (...)* @test_weak, i32 (...)** @t, align 4 + ret void +} + +; CHECK: .weak test_weak +declare extern_weak i32 @test_weak(...)