From: Nicolai Hähnle Date: Thu, 4 Apr 2019 09:49:52 +0000 (+0200) Subject: amd/common: use ARRAY_SIZE for the LLVM command line options X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ff2440eee8464c05a9d1df564518a874928a077;p=mesa.git amd/common: use ARRAY_SIZE for the LLVM command line options This is more convenient for changing it around during debug. Reviewed-by: Marek Olšák --- diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index c8a8bf146fe..7ee9a490da0 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -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;