diff options
author | Jacob Lambert <jacob.lambert@amd.com> | 2024-06-28 14:35:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 14:35:29 -0700 |
commit | 2264544e2d13957f36fd19864d9633a3278a9d74 (patch) | |
tree | 722fb8132cca7decb1fce86c0d8388f1ef5ff97c /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | d70963a762850e74b79e178e006dc7861c2c94e5 (diff) | |
download | llvm-2264544e2d13957f36fd19864d9633a3278a9d74.zip llvm-2264544e2d13957f36fd19864d9633a3278a9d74.tar.gz llvm-2264544e2d13957f36fd19864d9633a3278a9d74.tar.bz2 |
[clang][CodeGen] Remove unnecessary ShouldLinkFiles conditional (#96951)
We have reworked the bitcode linking option to no longer link twice if
post-optimization linking is requested. As such, we no longer need to
conditionally link bitcodes supplied via -mlink-bitcode-file, as there
is no danger of linking them twice
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 7766383..0b92c53 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -226,16 +226,11 @@ void BackendConsumer::HandleInterestingDecl(DeclGroupRef D) { HandleTopLevelDecl(D); } -// Links each entry in LinkModules into our module. Returns true on error. -bool BackendConsumer::LinkInModules(llvm::Module *M, bool ShouldLinkFiles) { +// Links each entry in LinkModules into our module. Returns true on error. +bool BackendConsumer::LinkInModules(llvm::Module *M) { for (auto &LM : LinkModules) { assert(LM.Module && "LinkModule does not actually have a module"); - // If ShouldLinkFiles is not set, skip files added via the - // -mlink-bitcode-files, only linking -mlink-builtin-bitcode - if (!LM.Internalize && !ShouldLinkFiles) - continue; - if (LM.PropagateAttrs) for (Function &F : *LM.Module) { // Skip intrinsics. Keep consistent with how intrinsics are created |