amd/common: use ARRAY_SIZE for the LLVM command line options
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 4 Apr 2019 09:49:52 +0000 (11:49 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 13 Jun 2019 00:28:23 +0000 (20:28 -0400)
This is more convenient for changing it around during debug.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_util.c

index c8a8bf146fe56ee3ba080556e418ed6eb4a516f2..7ee9a490da0d8ac0cc77e58d3361762b6a3776fa 100644 (file)
@@ -59,8 +59,8 @@ static void ac_init_llvm_target()
         * This option tells the backend to fall-back to SelectionDAG and print
         * a diagnostic message if global isel fails.
         */
-       const char *argv[3] = { "mesa", "-simplifycfg-sink-common=false", "-global-isel-abort=2" };
-       LLVMParseCommandLineOptions(3, argv, NULL);
+       const char *argv[] = { "mesa", "-simplifycfg-sink-common=false", "-global-isel-abort=2" };
+       LLVMParseCommandLineOptions(ARRAY_SIZE(argv), argv, NULL);
 }
 
 static once_flag ac_init_llvm_target_once_flag = ONCE_FLAG_INIT;