mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 14:16:06 +00:00

D33412/D33413 introduced this to support a clang pragma to set section names for a symbol depending on if it would be placed in bss/data/rodata/text, which may not be known until the backend. However, for text we know that only functions will go there, so just directly set the section in clang instead of going through a completely separate attribute. Autoupgrade the "implicit-section-name" attribute to directly setting the section on a Fuction.
9 lines
205 B
LLVM
9 lines
205 B
LLVM
; RUN: llvm-as < %s | llvm-dis - | FileCheck %s
|
|
|
|
; CHECK: define void @f() section "foo_section"
|
|
; CHECK-NOT: "implicit-section-name"
|
|
|
|
define void @f() "implicit-section-name"="foo_section" {
|
|
ret void
|
|
}
|