aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/JSON.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2020-09-24 17:27:27 +0700
committerSerge Pavlov <sepavloff@gmail.com>2020-09-24 17:32:24 +0700
commit590cc068c160f3b623d47fb34fd1d26848cb0e0a (patch)
treeb19aadd9cbc2d936c7a45507a0273d2b24113ce7 /llvm/lib/Support/JSON.cpp
parentbb0597067d1e7410e67d8c7d8a4c0ec9e6b26cd0 (diff)
downloadllvm-590cc068c160f3b623d47fb34fd1d26848cb0e0a.zip
llvm-590cc068c160f3b623d47fb34fd1d26848cb0e0a.tar.gz
llvm-590cc068c160f3b623d47fb34fd1d26848cb0e0a.tar.bz2
Use different name for auto variable
Without this change GCC 5.4.0 failed to compile JSON.cpp with the error: .../llvm-project/llvm/lib/Support/JSON.cpp: In lambda function: .../llvm-project/llvm/lib/Support/JSON.cpp:291:29: error: use of 'V' before deduction of 'auto' for (const auto &V : *V.getAsArray())
Diffstat (limited to 'llvm/lib/Support/JSON.cpp')
-rw-r--r--llvm/lib/Support/JSON.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/JSON.cpp b/llvm/lib/Support/JSON.cpp
index 0672ddd..d44961b 100644
--- a/llvm/lib/Support/JSON.cpp
+++ b/llvm/lib/Support/JSON.cpp
@@ -288,8 +288,8 @@ void abbreviateChildren(const Value &V, OStream &JOS, raw_ostream &OS) {
switch (V.kind()) {
case Value::Array:
JOS.array([&] {
- for (const auto &V : *V.getAsArray())
- abbreviate(V, JOS, OS);
+ for (const auto &I : *V.getAsArray())
+ abbreviate(I, JOS, OS);
});
break;
case Value::Object: