aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2024-04-11 13:29:29 -0600
committerGitHub <noreply@github.com>2024-04-11 12:29:29 -0700
commit5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7 (patch)
tree48a5f61c610b0d015e75b3b649eb383b63cc9f99 /clang/lib/CodeGen/CodeGenModule.cpp
parent41e8a9b1b2010b8111a0488a03b057cb8e33a199 (diff)
downloadllvm-5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7.zip
llvm-5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7.tar.gz
llvm-5d6d8dcd292e0a107b11d378932eee9c2f9ccfc7.tar.bz2
[clang][llvm] Remove "implicit-section-name" attribute (#87906)
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.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index b15031d..73a9cb9 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2635,7 +2635,7 @@ void CodeGenModule::setNonAliasAttributes(GlobalDecl GD,
addUsedGlobal(F);
if (auto *SA = D->getAttr<PragmaClangTextSectionAttr>())
if (!D->getAttr<SectionAttr>())
- F->addFnAttr("implicit-section-name", SA->getName());
+ F->setSection(SA->getName());
llvm::AttrBuilder Attrs(F->getContext());
if (GetCPUAndFeaturesAttributes(GD, Attrs)) {