Mesa (master): amd/common: use ARRAY_SIZE for the LLVM command line options

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 13 00:40:14 UTC 2019


Module: Mesa
Branch: master
Commit: 1ff2440eee8464c05a9d1df564518a874928a077
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ff2440eee8464c05a9d1df564518a874928a077

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Apr  4 11:49:52 2019 +0200

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 <marek.olsak at amd.com>

---

 src/amd/common/ac_llvm_util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;




More information about the mesa-commit mailing list