aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Linker/Linker.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Linker/Linker.h')
-rw-r--r--include/llvm/Linker/Linker.h19
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