[llvm] [NFCI][Globals] In GlobalObjects::setSectionPrefix, do conditional update if existing prefix is not equivalent to the new one. Returns whether prefix changed. (PR #158460)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 11:12:39 PDT 2025


================
@@ -121,8 +121,10 @@ class GlobalObject : public GlobalValue {
   /// appropriate default object file section.
   LLVM_ABI void setSection(StringRef S);
 
-  /// Set the section prefix for this global object.
-  LLVM_ABI void setSectionPrefix(StringRef Prefix);
+  /// If existing prefix is different from \p Prefix is different, set it to
----------------
mingmingl-llvm wrote:

thanks for the catch! fixed it.

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


More information about the llvm-commits mailing list