[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)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 11:11:22 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
----------------
teresajohnson wrote:

redundant "different"

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


More information about the llvm-commits mailing list