[llvm] eb9ac2c - [llvm-remark-size-diff] Don't use enum name as auto variable name

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 5 11:30:17 PST 2022


Author: Simon Pilgrim
Date: 2022-02-05T19:30:10Z
New Revision: eb9ac2cc14b6058c9b9481bbe8b1cd26da6353e1

URL: https://github.com/llvm/llvm-project/commit/eb9ac2cc14b6058c9b9481bbe8b1cd26da6353e1
DIFF: https://github.com/llvm/llvm-project/commit/eb9ac2cc14b6058c9b9481bbe8b1cd26da6353e1.diff

LOG: [llvm-remark-size-diff] Don't use enum name as auto variable name

This was confusing the clang-cmake-x86_64-avx2-linux buildbot (gcc version 5.4.0).

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-remark-size-
diff /RemarkSizeDiff.cpp b/llvm/tools/llvm-remark-size-
diff /RemarkSizeDiff.cpp
index 5fdf933078d1..e18bccdd26ce 100644
--- a/llvm/tools/llvm-remark-size-
diff /RemarkSizeDiff.cpp
+++ b/llvm/tools/llvm-remark-size-
diff /RemarkSizeDiff.cpp
@@ -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;


        


More information about the llvm-commits mailing list