Skip to content

Commit 7f63db1

Browse files
committed
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.
1 parent 43e2a90 commit 7f63db1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ llvm::Expected<LookupResult> FunctionInfo::lookup(DataExtractor &Data,
183183
if (!Data.isValidOffsetForDataOfSize(Offset, 8))
184184
return createStringError(std::errc::io_error,
185185
"FunctionInfo data is truncated");
186-
const uint32_t InfoType = Data.getU32(&Offset);
186+
const uint32_t IT = Data.getU32(&Offset);
187187
const uint32_t InfoLength = Data.getU32(&Offset);
188188
const StringRef InfoBytes = Data.getData().substr(Offset, InfoLength);
189189
if (InfoLength != InfoBytes.size())
190190
return createStringError(std::errc::io_error,
191191
"FunctionInfo data is truncated");
192192
DataExtractor InfoData(InfoBytes, Data.isLittleEndian(),
193193
Data.getAddressSize());
194-
switch (InfoType) {
194+
switch (IT) {
195195
case InfoType::EndOfList:
196196
Done = true;
197197
break;

0 commit comments

Comments
 (0)