diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-30 17:30:44 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-10-30 17:30:44 +0000 |
commit | 22a7dfea585703d6755db69b83e29a0e6ee10369 (patch) | |
tree | cfb53988caccc1f9a94f66ec59c8da2c0f2f0cb1 /include/clang/CodeGen/CodeGenAction.h | |
parent | 80b32b8c6546a12cf0d4af9c2cd785ec1f123188 (diff) |
Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/CodeGen/CodeGenAction.h')
-rw-r--r-- | include/clang/CodeGen/CodeGenAction.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/CodeGen/CodeGenAction.h b/include/clang/CodeGen/CodeGenAction.h index f1a2f6eb45..9697bc62af 100644 --- a/include/clang/CodeGen/CodeGenAction.h +++ b/include/clang/CodeGen/CodeGenAction.h @@ -25,6 +25,7 @@ class CodeGenAction : public ASTFrontendAction { private: unsigned Act; llvm::OwningPtr<llvm::Module> TheModule; + llvm::Module *LinkModule; llvm::LLVMContext *VMContext; bool OwnsVMContext; @@ -46,6 +47,11 @@ protected: public: ~CodeGenAction(); + /// setLinkModule - Set the link module to be used by this action. If a link + /// module is not provided, and CodeGenOptions::LinkBitcodeFile is non-empty, + /// the action will load it from the specified file. + void setLinkModule(llvm::Module *Mod) { LinkModule = Mod; } + /// takeModule - Take the generated LLVM module, for use after the action has /// been run. The result may be null on failure. llvm::Module *takeModule(); |