[llvm-remark-size-diff] Don't use enum name as auto variable name
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 5 Feb 2022 19:30:03 +0000 (19:30 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 5 Feb 2022 19:30:10 +0000 (19:30 +0000)
This was confusing the clang-cmake-x86_64-avx2-linux buildbot (gcc version 5.4.0).

llvm/tools/llvm-remark-size-diff/RemarkSizeDiff.cpp

index 5fdf933..e18bccd 100644 (file)
@@ -135,13 +135,13 @@ struct DiffsCategorizedByFilesPresent {
 
 static void printFunctionDiff(const FunctionDiff &FD, llvm::raw_ostream &OS) {
   // Describe which files the function had remarks in.
-  auto FilesPresent = FD.getFilesPresent();
-  const auto &FuncName = FD.FuncName;
+  FilesPresent FP = FD.getFilesPresent();
+  const std::string &FuncName = FD.FuncName;
   const int64_t InstDiff = FD.getInstDiff();
   assert(InstDiff && "Shouldn't get functions with no size change?");
   const int64_t StackDiff = FD.getStackDiff();
   // Output an indicator denoting which files the function was present in.
-  switch (FilesPresent) {
+  switch (FP) {
   case FilesPresent::A:
     OS << "-- ";
     break;