aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-08-17 10:38:38 -0700
committerFangrui Song <i@maskray.me>2022-08-17 10:38:38 -0700
commitaf3707c3b89f80ab7b43feb1345af24080105254 (patch)
tree18f1f80b024a8bf9ead43cd4fbf7876820f4488e /llvm/lib/MC
parent[llvm] [cmake] Move LLVM_INSTALL_PACKAGE_DIR top-level to fix llvm-config (diff)
downloadllvm-project-af3707c3b89f80ab7b43feb1345af24080105254.tar.gz
llvm-project-af3707c3b89f80ab7b43feb1345af24080105254.tar.bz2
llvm-project-af3707c3b89f80ab7b43feb1345af24080105254.zip
[MC] Avoid C++17 structured bindings
release/15.x uses C++14 and structured bindings trigger warnings in Clang/GCC and errors in MSVC.
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 29597088a212..062246f9c7ee 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;
}