[llvm] c4960f6 - [llvm-reduce] Change initialization order to fix bots. NFC

Matthew Voss via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 09:57:39 PDT 2022


Author: Matthew Voss
Date: 2022-06-30T09:56:47-07:00
New Revision: c4960f6363c43a35851d1565b7fe96926ed82722

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

LOG: [llvm-reduce] Change initialization order to fix bots. NFC

Fixes this error:
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/
llvm-project/llvm/tools/llvm-reduce/TestRunner.cpp:20:7:
error: field 'TM' will be initialized after field 'ToolName'
[-Werror,-Wreorder-ctor]
      TM(std::move(TM)), ToolName(ToolName) {
      ^~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~
      Program(std::move(Program)) TM(std::move(TM))
1 error generated.

https://lab.llvm.org/buildbot/\#/builders/77/builds/19154

Added: 
    

Modified: 
    llvm/tools/llvm-reduce/TestRunner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-reduce/TestRunner.cpp b/llvm/tools/llvm-reduce/TestRunner.cpp
index 166222e0ed79..691790dd9e8d 100644
--- a/llvm/tools/llvm-reduce/TestRunner.cpp
+++ b/llvm/tools/llvm-reduce/TestRunner.cpp
@@ -16,8 +16,8 @@ TestRunner::TestRunner(StringRef TestName,
                        const std::vector<std::string> &TestArgs,
                        std::unique_ptr<ReducerWorkItem> Program,
                        std::unique_ptr<TargetMachine> TM, const char *ToolName)
-    : TestName(TestName), TestArgs(TestArgs), Program(std::move(Program)),
-      TM(std::move(TM)), ToolName(ToolName) {
+    : TestName(TestName), ToolName(ToolName), TestArgs(TestArgs),
+      Program(std::move(Program)), TM(std::move(TM)) {
   assert(this->Program && "Initialized with null program?");
 }
 


        


More information about the llvm-commits mailing list