[llvm] e6e5e3e - [llvm-readobj] Fix forward build breakages caused by https://reviews.llvm.org/rG33b3c86afab06ad61d46456c85c0b565cfff8287
Vy Nguyen via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 12:23:07 PDT 2022
Author: Vy Nguyen
Date: 2022-03-31T15:22:51-04:00
New Revision: e6e5e3e025ec1ccb8ebaff6ce4d6212edc491602
URL: https://github.com/llvm/llvm-project/commit/e6e5e3e025ec1ccb8ebaff6ce4d6212edc491602
DIFF: https://github.com/llvm/llvm-project/commit/e6e5e3e025ec1ccb8ebaff6ce4d6212edc491602.diff
LOG: [llvm-readobj] Fix forward build breakages caused by https://reviews.llvm.org/rG33b3c86afab06ad61d46456c85c0b565cfff8287
Change: use std::function instead of function_ref because it's not safe to store a function_ref
(original phab: https://reviews.llvm.org/D116787)
Added:
Modified:
llvm/tools/llvm-readobj/ObjDumper.h
Removed:
################################################################################
diff --git a/llvm/tools/llvm-readobj/ObjDumper.h b/llvm/tools/llvm-readobj/ObjDumper.h
index c1edf981cf2a6..a7633301c5ab5 100644
--- a/llvm/tools/llvm-readobj/ObjDumper.h
+++ b/llvm/tools/llvm-readobj/ObjDumper.h
@@ -9,6 +9,7 @@
#ifndef LLVM_TOOLS_LLVM_READOBJ_OBJDUMPER_H
#define LLVM_TOOLS_LLVM_READOBJ_OBJDUMPER_H
+#include <functional.
#include <memory>
#include <system_error>
@@ -44,7 +45,7 @@ class ScopedPrinter;
class SymbolComparator {
public:
using CompPredicate =
- function_ref<bool(object::SymbolRef, object::SymbolRef)>;
+ std::function<bool(object::SymbolRef, object::SymbolRef)>;
// Each Obj format has a slightly
diff erent way of retrieving a symbol's info
// So we defer the predicate's impl to each format.
More information about the llvm-commits
mailing list