From d29bdc72bbefc938a23b51ac4282548d6e36d317 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sun, 25 May 2014 21:37:59 +0000 Subject: tools: avoid use of std::function Remove the use of the std::function and replace the capturing lambda with a non-capturing one, opting to pass the user data down to the context. This is needed as std::function is not yet available on all hosted platforms (it requires RTTI, which breaks on Windows). Thanks to Nico Rieck for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209607 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-readobj/Win64EHDumper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/llvm-readobj/Win64EHDumper.cpp') diff --git a/tools/llvm-readobj/Win64EHDumper.cpp b/tools/llvm-readobj/Win64EHDumper.cpp index 449df001cc..c64d362469 100644 --- a/tools/llvm-readobj/Win64EHDumper.cpp +++ b/tools/llvm-readobj/Win64EHDumper.cpp @@ -120,7 +120,8 @@ static std::string formatSymbol(const Dumper::Context &Ctx, StringRef Name; SymbolRef Symbol; - if (Ctx.ResolveSymbol(Section, Offset, Symbol) || Symbol.getName(Name)) { + if (Ctx.ResolveSymbol(Section, Offset, Symbol, Ctx.UserData) || + Symbol.getName(Name)) { OS << format(" (0x%" PRIX64 ")", Offset); return OS.str(); } @@ -139,7 +140,7 @@ static error_code resolveRelocation(const Dumper::Context &Ctx, const coff_section *&ResolvedSection, uint64_t &ResolvedAddress) { SymbolRef Symbol; - if (error_code EC = Ctx.ResolveSymbol(Section, Offset, Symbol)) + if (error_code EC = Ctx.ResolveSymbol(Section, Offset, Symbol, Ctx.UserData)) return EC; if (error_code EC = Symbol.getAddress(ResolvedAddress)) -- cgit v1.2.3