diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-05-25 21:37:59 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-05-25 21:37:59 +0000 |
commit | 65dbbb5dd6c5f8c00e2789e6796962091ab22fb7 (patch) | |
tree | f6d6077b06e2b479998f812cf3e5a6785ae3d530 /llvm/tools/llvm-readobj/Win64EHDumper.cpp | |
parent | e8839a755a338fac5e1205a7bb61f3e7c467bda1 (diff) | |
download | bcm5719-llvm-65dbbb5dd6c5f8c00e2789e6796962091ab22fb7.tar.gz bcm5719-llvm-65dbbb5dd6c5f8c00e2789e6796962091ab22fb7.zip |
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!
llvm-svn: 209607
Diffstat (limited to 'llvm/tools/llvm-readobj/Win64EHDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/Win64EHDumper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-readobj/Win64EHDumper.cpp b/llvm/tools/llvm-readobj/Win64EHDumper.cpp index 449df001cc9..c64d362469b 100644 --- a/llvm/tools/llvm-readobj/Win64EHDumper.cpp +++ b/llvm/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)) |