From 7f63db197e7453a6438c15e50a5508cc7613a293 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 6 Dec 2019 11:24:25 -0800 Subject: [PATCH] Avoid naming variable after type to fix GCC 5.3 build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC says: .../llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp:195:12: error: ‘InfoType’ is not a class, namespace, or enumeration case InfoType::EndOfList: ^ Presumably, GCC thinks InfoType is a variable here. Work around it by using the name IT as is done above. --- llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp b/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp index 26aab06108b6..6731a8b27443 100644 --- a/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp +++ b/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp @@ -183,7 +183,7 @@ llvm::Expected FunctionInfo::lookup(DataExtractor &Data, if (!Data.isValidOffsetForDataOfSize(Offset, 8)) return createStringError(std::errc::io_error, "FunctionInfo data is truncated"); - const uint32_t InfoType = Data.getU32(&Offset); + const uint32_t IT = Data.getU32(&Offset); const uint32_t InfoLength = Data.getU32(&Offset); const StringRef InfoBytes = Data.getData().substr(Offset, InfoLength); if (InfoLength != InfoBytes.size()) @@ -191,7 +191,7 @@ llvm::Expected FunctionInfo::lookup(DataExtractor &Data, "FunctionInfo data is truncated"); DataExtractor InfoData(InfoBytes, Data.isLittleEndian(), Data.getAddressSize()); - switch (InfoType) { + switch (IT) { case InfoType::EndOfList: Done = true; break;