Skip to content

Commit

Permalink
[NameAnonGlobals] Mark the pass as required
Browse files Browse the repository at this point in the history
NameAnonGlobals is required when emitting ThinLTO bitcode,
otherwise the bitcode writer will crash.
  • Loading branch information
nikic committed Jan 15, 2024
1 parent 7bc170a commit eae2436
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/include/llvm/Transforms/Utils/NameAnonGlobals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eae2436

Please sign in to comment.