From 1ff2440eee8464c05a9d1df564518a874928a077 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Thu, 4 Apr 2019 11:49:52 +0200 Subject: amd/common: use ARRAY_SIZE for the LLVM command line options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is more convenient for changing it around during debug. Reviewed-by: Marek Olšák --- src/amd/common/ac_llvm_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/amd') 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; -- cgit v1.2.3