Author: Fangrui Song Date: 2022-08-17T10:38:38-07:00 New Revision: af3707c3b89f80ab7b43feb1345af24080105254
URL: https://github.com/llvm/llvm-project/commit/af3707c3b89f80ab7b43feb1345af24080105254 DIFF: https://github.com/llvm/llvm-project/commit/af3707c3b89f80ab7b43feb1345af24080105254.diff LOG: [MC] Avoid C++17 structured bindings release/15.x uses C++14 and structured bindings trigger warnings in Clang/GCC and errors in MSVC. Added: Modified: llvm/lib/MC/MCContext.cpp Removed: ################################################################################ diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 29597088a212e..062246f9c7ee5 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -856,8 +856,8 @@ void MCContext::addDebugPrefixMapEntry(const std::string &From, } void MCContext::remapDebugPath(SmallVectorImpl<char> &Path) { - for (const auto &[From, To] : DebugPrefixMap) - if (llvm::sys::path::replace_path_prefix(Path, From, To)) + for (const auto &V : DebugPrefixMap) + if (llvm::sys::path::replace_path_prefix(Path, V.first, V.second)) break; } _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
