diff options
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(); |