diff options
author | Reid Kleckner <rnk@google.com> | 2019-12-06 11:24:25 -0800 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-12-06 11:25:28 -0800 |
commit | 7f63db197e7453a6438c15e50a5508cc7613a293 (patch) | |
tree | a93035cdfc618ef570814e181b37169e8f7e0901 | |
parent | 43e2a901e1521759a0176cdec3aad4d00919142e (diff) | |
download | bcm5719-llvm-7f63db197e7453a6438c15e50a5508cc7613a293.tar.gz bcm5719-llvm-7f63db197e7453a6438c15e50a5508cc7613a293.zip |
Avoid naming variable after type to fix GCC 5.3 build
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.
-rw-r--r-- | llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp b/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp index 26aab06108b..6731a8b2744 100644 --- a/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp +++ b/llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp @@ -183,7 +183,7 @@ llvm::Expected<LookupResult> 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<LookupResult> 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; |