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

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 00:47:39 PST 2024


Author: Nikita Popov
Date: 2024-01-16T09:47:35+01:00
New Revision: cd263a7ee00cf508fef54aa9e42789e6a2e60137

URL: https://github.com/llvm/llvm-project/commit/cd263a7ee00cf508fef54aa9e42789e6a2e60137
DIFF: https://github.com/llvm/llvm-project/commit/cd263a7ee00cf508fef54aa9e42789e6a2e60137.diff

LOG: [NameAnonGlobals] Mark the pass as required (#78161)

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

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h

Removed: 
    


################################################################################
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


        


More information about the llvm-commits mailing list