1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[NVPTX] Do not emit .hidden or .protected directives as they are not allowed by PTX.

llvm-svn: 257961
This commit is contained in:
Artem Belevich 2016-01-15 23:57:53 +00:00
parent e6a5617700
commit b31d5d18b5
2 changed files with 19 additions and 0 deletions

View File

@ -41,6 +41,9 @@ NVPTXMCAsmInfo::NVPTXMCAsmInfo(const Triple &TheTriple) {
// PTX does not allow .align on functions.
HasFunctionAlignment = false;
HasDotTypeDotSizeDirective = false;
// PTX does not allow .hidden or .protected
HiddenDeclarationVisibilityAttr = HiddenVisibilityAttr = MCSA_Invalid;
ProtectedVisibilityAttr = MCSA_Invalid;
Data8bitsDirective = " .b8 ";
Data16bitsDirective = " .b16 ";

View File

@ -0,0 +1,16 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
; PTX does not support .hidden or .protected.
; Make sure we do not emit them.
define hidden void @f_hidden() {
ret void
}
; CHECK-NOT: .hidden
; CHECK: .visible .func f_hidden
define protected void @f_protected() {
ret void
}
; CHECK-NOT: .protected
; CHECK: .visible .func f_protected