[clang] Fix objc_sel_{name,types} missing an underscore (PR #88713)
Jonathan Schleifer via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 15 05:27:07 PDT 2024
https://github.com/Midar updated https://github.com/llvm/llvm-project/pull/88713
>From 8dc7333c0e9c757bba91ebfbe57280ad0635afa9 Mon Sep 17 00:00:00 2001
From: Jonathan Schleifer <js at nil.im>
Date: Mon, 15 Apr 2024 13:36:05 +0200
Subject: [PATCH] Fix objc_sel_{name,types} missing an underscore
The other places all use the underscore.
This also makes .objc_sel_name_* consistently private.
---
clang/lib/CodeGen/CGObjCGNU.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 4e7f777ba1d916..d2823b7ee3de46 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -3873,13 +3873,14 @@ llvm::Function *CGObjCGNU::ModuleInitFunction() {
for (auto &untypedSel : allSelectors) {
std::string selNameStr = untypedSel.getAsString();
- llvm::Constant *selName = ExportUniqueString(selNameStr, ".objc_sel_name");
+ llvm::Constant *selName = ExportUniqueString(selNameStr,
+ ".objc_sel_name_", true);
for (TypedSelector &sel : table[untypedSel]) {
llvm::Constant *selectorTypeEncoding = NULLPtr;
if (!sel.first.empty())
selectorTypeEncoding =
- MakeConstantString(sel.first, ".objc_sel_types");
+ MakeConstantString(sel.first, ".objc_sel_types_");
auto selStruct = selectors.beginStruct(selStructTy);
selStruct.add(selName);
More information about the cfe-commits
mailing list