[llvm] [AMDGPU] Localize resource info symbols (PR #185732)

Janek van Oirschot via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 06:59:37 PDT 2026


================
@@ -25,10 +25,9 @@
 using namespace llvm;
 
 MCSymbol *MCResourceInfo::getSymbol(StringRef FuncName, ResourceInfoKind RIK,
-                                    MCContext &OutContext, bool IsLocal) {
-  auto GOCS = [FuncName, &OutContext, IsLocal](StringRef Suffix) {
-    StringRef Prefix =
-        IsLocal ? OutContext.getAsmInfo()->getInternalSymbolPrefix() : "";
+                                    MCContext &OutContext) {
+  auto GOCS = [FuncName, &OutContext](StringRef Suffix) {
+    StringRef Prefix = OutContext.getAsmInfo()->getInternalSymbolPrefix();
----------------
JanekvO wrote:

That one doesn't retrieve using `getOrCreateSymbol` so it loses the variable assignment that's required for the symbols-with-mcexpr-assignments to work.

https://github.com/llvm/llvm-project/pull/185732


More information about the llvm-commits mailing list