summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-06-12 16:13:55 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-06-12 16:13:55 +0000
commitd3f4c05aea3781a40b8048e5192eaad3c30d165a (patch)
tree0e501afe0df503cf86afe76a7324ce00c6460094 /llvm/lib/LTO/LTO.cpp
parentbdc4956bac81a93d541bc2fab0fdcc7ffdeb5cdd (diff)
downloadbcm5719-llvm-d3f4c05aea3781a40b8048e5192eaad3c30d165a.tar.gz
bcm5719-llvm-d3f4c05aea3781a40b8048e5192eaad3c30d165a.zip
Move instances of std::function.
Or replace with llvm::function_ref if it's never stored. NFC intended. llvm-svn: 272513
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 11ffb59f604..094b0c6b31a 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -43,10 +43,10 @@ std::unique_ptr<Module> loadModuleFromBuffer(const MemoryBufferRef &Buffer,
static void thinLTOResolveWeakForLinkerGUID(
GlobalValueSummaryList &GVSummaryList, GlobalValue::GUID GUID,
DenseSet<GlobalValueSummary *> &GlobalInvolvedWithAlias,
- std::function<bool(GlobalValue::GUID, const GlobalValueSummary *)>
+ function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
isPrevailing,
- std::function<bool(StringRef, GlobalValue::GUID)> isExported,
- std::function<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
+ function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
+ function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
recordNewLinkage) {
auto HasMultipleCopies = GVSummaryList.size() > 1;
@@ -87,10 +87,10 @@ static void thinLTOResolveWeakForLinkerGUID(
// one copy.
void thinLTOResolveWeakForLinkerInIndex(
ModuleSummaryIndex &Index,
- std::function<bool(GlobalValue::GUID, const GlobalValueSummary *)>
+ function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
isPrevailing,
- std::function<bool(StringRef, GlobalValue::GUID)> isExported,
- std::function<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
+ function_ref<bool(StringRef, GlobalValue::GUID)> isExported,
+ function_ref<void(StringRef, GlobalValue::GUID, GlobalValue::LinkageTypes)>
recordNewLinkage) {
if (Index.modulePaths().size() == 1)
// Nothing to do if we don't have multiple modules
@@ -112,7 +112,7 @@ void thinLTOResolveWeakForLinkerInIndex(
static void thinLTOInternalizeAndPromoteGUID(
GlobalValueSummaryList &GVSummaryList, GlobalValue::GUID GUID,
- std::function<bool(StringRef, GlobalValue::GUID)> isExported) {
+ function_ref<bool(StringRef, GlobalValue::GUID)> isExported) {
for (auto &S : GVSummaryList) {
if (isExported(S->modulePath(), GUID)) {
if (GlobalValue::isLocalLinkage(S->linkage()))
@@ -126,7 +126,7 @@ static void thinLTOInternalizeAndPromoteGUID(
// as external and non-exported values as internal.
void thinLTOInternalizeAndPromoteInIndex(
ModuleSummaryIndex &Index,
- std::function<bool(StringRef, GlobalValue::GUID)> isExported) {
+ function_ref<bool(StringRef, GlobalValue::GUID)> isExported) {
for (auto &I : Index)
thinLTOInternalizeAndPromoteGUID(I.second, I.first, isExported);
}
OpenPOWER on IntegriCloud