Skip to content

Commit cd263a7

Browse files
authored
[NameAnonGlobals] Mark the pass as required (#78161)
NameAnonGlobals is required when emitting ThinLTO bitcode, otherwise the bitcode writer will crash.
1 parent 510626f commit cd263a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class NameAnonGlobalPass : public PassInfoMixin<NameAnonGlobalPass> {
2424
NameAnonGlobalPass() = default;
2525

2626
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
27+
28+
static bool isRequired() { return true; }
2729
};
2830

2931
} // end namespace llvm

0 commit comments

Comments
 (0)