summaryrefslogtreecommitdiff
path: root/include/llvm/LTO
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/LTO')
-rw-r--r--include/llvm/LTO/Config.h2
-rw-r--r--include/llvm/LTO/LTO.h10
-rw-r--r--include/llvm/LTO/legacy/LTOCodeGenerator.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/LTO/Config.h b/include/llvm/LTO/Config.h
index fb107e3fbe024..daa6585b11130 100644
--- a/include/llvm/LTO/Config.h
+++ b/include/llvm/LTO/Config.h
@@ -226,7 +226,7 @@ struct LTOLLVMContext : LLVMContext {
setDiscardValueNames(C.ShouldDiscardValueNames);
enableDebugTypeODRUniquing();
setDiagnosticHandler(
- llvm::make_unique<LTOLLVMDiagnosticHandler>(&DiagHandler), true);
+ std::make_unique<LTOLLVMDiagnosticHandler>(&DiagHandler), true);
}
DiagnosticHandlerFunction DiagHandler;
};
diff --git a/include/llvm/LTO/LTO.h b/include/llvm/LTO/LTO.h
index ca0a8b64523ac..0a1e3e1d0e425 100644
--- a/include/llvm/LTO/LTO.h
+++ b/include/llvm/LTO/LTO.h
@@ -59,7 +59,9 @@ void thinLTOResolvePrevailingInIndex(
/// must apply the changes to the Module via thinLTOInternalizeModule.
void thinLTOInternalizeAndPromoteInIndex(
ModuleSummaryIndex &Index,
- function_ref<bool(StringRef, GlobalValue::GUID)> isExported);
+ function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
+ function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
+ isPrevailing);
/// Computes a unique hash for the Module considering the current list of
/// export/import and other global analysis results.
@@ -296,6 +298,10 @@ public:
/// Cache) for each task identifier.
Error run(AddStreamFn AddStream, NativeObjectCache Cache = nullptr);
+ /// Static method that returns a list of libcall symbols that can be generated
+ /// by LTO but might not be visible from bitcode symbol table.
+ static ArrayRef<const char*> getRuntimeLibcallSymbols();
+
private:
Config Conf;
@@ -303,7 +309,7 @@ private:
RegularLTOState(unsigned ParallelCodeGenParallelismLevel, Config &Conf);
struct CommonResolution {
uint64_t Size = 0;
- unsigned Align = 0;
+ MaybeAlign Align;
/// Record if at least one instance of the common was marked as prevailing
bool Prevailing = false;
};
diff --git a/include/llvm/LTO/legacy/LTOCodeGenerator.h b/include/llvm/LTO/legacy/LTOCodeGenerator.h
index d3cb4c8b79a00..8718df4b88e68 100644
--- a/include/llvm/LTO/legacy/LTOCodeGenerator.h
+++ b/include/llvm/LTO/legacy/LTOCodeGenerator.h
@@ -113,7 +113,7 @@ struct LTOCodeGenerator {
ShouldRestoreGlobalsLinkage = Value;
}
- void addMustPreserveSymbol(StringRef Sym) { MustPreserveSymbols[Sym] = 1; }
+ void addMustPreserveSymbol(StringRef Sym) { MustPreserveSymbols.insert(Sym); }
/// Pass options to the driver and optimization passes.
///