mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
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
This commit is contained in:
@ -849,11 +849,12 @@ void COFFDumper::printUnwindInfo() {
|
||||
case COFF::IMAGE_FILE_MACHINE_AMD64: {
|
||||
Win64EH::Dumper Dumper(W);
|
||||
Win64EH::Dumper::SymbolResolver Resolver =
|
||||
[this](const object::coff_section *Section, uint64_t Offset,
|
||||
SymbolRef &Symbol) -> error_code {
|
||||
return this->resolveSymbol(Section, Offset, Symbol);
|
||||
[](const object::coff_section *Section, uint64_t Offset,
|
||||
SymbolRef &Symbol, void *user_data) -> error_code {
|
||||
COFFDumper *Dumper = reinterpret_cast<COFFDumper*>(user_data);
|
||||
return Dumper->resolveSymbol(Section, Offset, Symbol);
|
||||
};
|
||||
Win64EH::Dumper::Context Ctx(*Obj, Resolver);
|
||||
Win64EH::Dumper::Context Ctx(*Obj, Resolver, this);
|
||||
Dumper.printData(Ctx);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user