mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-02 15:16:03 +00:00
MSVC no longer requires the explicit cast operation to obtain a function pointer from this capture-less lambda. NFC.
llvm-svn: 229426
This commit is contained in:
parent
d6b108e445
commit
4d0397382c
@ -653,13 +653,8 @@ std::error_code FileCOFF::AtomizeDefinedSymbolsInSection(
|
||||
// Sort symbols by position.
|
||||
std::stable_sort(
|
||||
symbols.begin(), symbols.end(),
|
||||
// For some reason MSVC fails to allow the lambda in this context with a
|
||||
// "illegal use of local type in type instantiation". MSVC is clearly
|
||||
// wrong here. Force a conversion to function pointer to work around.
|
||||
static_cast<bool (*)(llvm::object::COFFSymbolRef,
|
||||
llvm::object::COFFSymbolRef)>(
|
||||
[](llvm::object::COFFSymbolRef a, llvm::object::COFFSymbolRef b)
|
||||
-> bool { return a.getValue() < b.getValue(); }));
|
||||
[](llvm::object::COFFSymbolRef a, llvm::object::COFFSymbolRef b)
|
||||
-> bool { return a.getValue() < b.getValue(); });
|
||||
|
||||
StringRef sectionName;
|
||||
if (std::error_code ec = _obj->getSectionName(section, sectionName))
|
||||
|
Loading…
x
Reference in New Issue
Block a user