Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NameAnonGlobals] Mark the pass as required #78161

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Jan 15, 2024

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

NameAnonGlobals is required when emitting ThinLTO bitcode,
otherwise the bitcode writer will crash.
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 15, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Nikita Popov (nikic)

Changes

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

@nikic nikic merged commit cd263a7 into llvm:main Jan 16, 2024
4 of 5 checks passed
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
NameAnonGlobals is required when emitting ThinLTO bitcode, otherwise the
bitcode writer will crash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants