diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /include/llvm/Linker/Linker.h | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'include/llvm/Linker/Linker.h')
-rw-r--r-- | include/llvm/Linker/Linker.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/llvm/Linker/Linker.h b/include/llvm/Linker/Linker.h index b077c373326f..628e0112bd9d 100644 --- a/include/llvm/Linker/Linker.h +++ b/include/llvm/Linker/Linker.h @@ -10,6 +10,7 @@ #ifndef LLVM_LINKER_LINKER_H #define LLVM_LINKER_LINKER_H +#include "llvm/ADT/StringSet.h" #include "llvm/Linker/IRMover.h" namespace llvm { @@ -29,10 +30,6 @@ public: None = 0, OverrideFromSrc = (1 << 0), LinkOnlyNeeded = (1 << 1), - InternalizeLinkedSymbols = (1 << 2), - /// Don't force link referenced linkonce definitions, import declaration. - DontForceLinkLinkonceODR = (1 << 3) - }; Linker(Module &M); @@ -41,16 +38,20 @@ public: /// /// Passing OverrideSymbols as true will have symbols from Src /// shadow those in the Dest. - /// For ThinLTO function importing/exporting the \p ModuleSummaryIndex - /// is passed. If \p GlobalsToImport is provided, only the globals that - /// are part of the set will be imported from the source module. + /// + /// Passing InternalizeCallback will have the linker call the function with + /// the new module and a list of global value names to be internalized by the + /// callback. /// /// Returns true on error. bool linkInModule(std::unique_ptr<Module> Src, unsigned Flags = Flags::None, - DenseSet<const GlobalValue *> *GlobalsToImport = nullptr); + std::function<void(Module &, const StringSet<> &)> + InternalizeCallback = {}); static bool linkModules(Module &Dest, std::unique_ptr<Module> Src, - unsigned Flags = Flags::None); + unsigned Flags = Flags::None, + std::function<void(Module &, const StringSet<> &)> + InternalizeCallback = {}); }; } // End llvm namespace |