llvm-6502/test/CodeGen/NVPTX/weak-linkage.ll
Jingyue Wu b043278834 [NVPTX] Do not emit .weak symbols for NVPTX
Summary:
".weak" symbols cannot be consumed by ptxas (PR21685). This patch makes the
weak directive in MCAsmPrinter customizable, and disables emitting ".weak"
symbols for NVPTX.

Test Plan: weak-linkage.ll

Reviewers: jholewinski

Reviewed By: jholewinski

Subscribers: majnemer, jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D6455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223077 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01 21:16:17 +00:00

19 lines
297 B
LLVM

; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
; CHECK: // .weak foo
; CHECK: .weak .func foo
define weak void @foo() {
ret void
}
; CHECK: // .weak baz
; CHECK: .weak .func baz
define weak_odr void @baz() {
ret void
}
; CHECK: .visible .func bar
define void @bar() {
ret void
}