[llvm] [NameAnonGlobals] Mark the pass as required (PR #78161)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 05:42:44 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Nikita Popov (nikic)

<details>
<summary>Changes</summary>

NameAnonGlobals is required when emitting ThinLTO bitcode, otherwise the bitcode writer will crash.

---
Full diff: https://github.com/llvm/llvm-project/pull/78161.diff


1 Files Affected:

- (modified) llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h (+2) 


``````````diff
diff --git a/llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h b/llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h
index a59f9bc3ebfb32..b1c181c1211b48 100644
--- a/llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h
+++ b/llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h
@@ -24,6 +24,8 @@ class NameAnonGlobalPass : public PassInfoMixin<NameAnonGlobalPass> {
   NameAnonGlobalPass() = default;
 
   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
+
+  static bool isRequired() { return true; }
 };
 
 } // end namespace llvm

``````````

</details>


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


More information about the llvm-commits mailing list