diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/CodeGen/LinkInModulesPass.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/CodeGen/LinkInModulesPass.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/llvm-project/clang/lib/CodeGen/LinkInModulesPass.cpp b/contrib/llvm-project/clang/lib/CodeGen/LinkInModulesPass.cpp index 6ce2b94c1db8..44b2df52f001 100644 --- a/contrib/llvm-project/clang/lib/CodeGen/LinkInModulesPass.cpp +++ b/contrib/llvm-project/clang/lib/CodeGen/LinkInModulesPass.cpp @@ -14,16 +14,20 @@ #include "LinkInModulesPass.h" #include "BackendConsumer.h" +#include "clang/Basic/CodeGenOptions.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/SourceManager.h" + using namespace llvm; -LinkInModulesPass::LinkInModulesPass(clang::BackendConsumer *BC, - bool ShouldLinkFiles) - : BC(BC), ShouldLinkFiles(ShouldLinkFiles) {} +LinkInModulesPass::LinkInModulesPass(clang::BackendConsumer *BC) : BC(BC) {} PreservedAnalyses LinkInModulesPass::run(Module &M, ModuleAnalysisManager &AM) { + if (!BC) + return PreservedAnalyses::all(); - if (BC && BC->LinkInModules(&M, ShouldLinkFiles)) - report_fatal_error("Bitcode module linking failed, compilation aborted!"); + if (BC->LinkInModules(&M)) + report_fatal_error("Bitcode module postopt linking failed, aborted!"); - return PreservedAnalyses::all(); + return PreservedAnalyses::none(); } |