summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/CtorUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CtorUtils.cpp b/llvm/lib/Transforms/Utils/CtorUtils.cpp
index 7cf793f6266..0082df01214 100644
--- a/llvm/lib/Transforms/Utils/CtorUtils.cpp
+++ b/llvm/lib/Transforms/Utils/CtorUtils.cpp
@@ -132,8 +132,8 @@ GlobalVariable *findGlobalCtors(Module &M) {
/// Call "ShouldRemove" for every entry in M's global_ctor list and remove the
/// entries for which it returns true. Return true if anything changed.
-bool optimizeGlobalCtorsList(Module &M,
- function_ref<bool(Function *)> ShouldRemove) {
+bool optimizeGlobalCtorsList(Module &M, ShouldRemoveCtor ShouldRemove,
+ void *Context) {
GlobalVariable *GlobalCtors = findGlobalCtors(M);
if (!GlobalCtors)
return false;
@@ -163,7 +163,7 @@ bool optimizeGlobalCtorsList(Module &M,
continue;
// If we can evaluate the ctor at compile time, do.
- if (ShouldRemove(F)) {
+ if (ShouldRemove(Context, F)) {
Ctors.erase(Ctors.begin() + i);
MadeChange = true;
--i;
OpenPOWER on IntegriCloud