diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /include/clang/CodeGen/CodeGenAction.h | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'include/clang/CodeGen/CodeGenAction.h')
-rw-r--r-- | include/clang/CodeGen/CodeGenAction.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/CodeGen/CodeGenAction.h b/include/clang/CodeGen/CodeGenAction.h index 264780d..cc38e24 100644 --- a/include/clang/CodeGen/CodeGenAction.h +++ b/include/clang/CodeGen/CodeGenAction.h @@ -25,7 +25,9 @@ class CodeGenAction : public ASTFrontendAction { private: unsigned Act; std::unique_ptr<llvm::Module> TheModule; - llvm::Module *LinkModule; + // Vector of {Linker::Flags, Module*} pairs to specify bitcode + // modules to link in using corresponding linker flags. + SmallVector<std::pair<unsigned, llvm::Module *>, 4> LinkModules; llvm::LLVMContext *VMContext; bool OwnsVMContext; @@ -50,7 +52,9 @@ public: /// 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; } + void addLinkModule(llvm::Module *Mod, unsigned LinkFlags) { + LinkModules.push_back(std::make_pair(LinkFlags, Mod)); + } /// Take the generated LLVM module, for use after the action has been run. /// The result may be null on failure. |