[Mesa-dev] [PATCH 1/4] amd/common: use ARRAY_SIZE for the LLVM command line options
Nicolai Hähnle
nhaehnle at gmail.com
Mon May 13 21:14:38 UTC 2019
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
This is more convenient for changing it around during debug.
---
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 69446863b95..16c1b25d8c2 100644
--- a/src/amd/common/ac_llvm_util.c
+++ b/src/amd/common/ac_llvm_util.c
@@ -52,22 +52,22 @@ static void ac_init_llvm_target()
/* Workaround for bug in llvm 4.0 that causes image intrinsics
* to disappear.
* https://reviews.llvm.org/D26348
*
* "mesa" is the prefix for error messages.
*
* -global-isel-abort=2 is a no-op unless global isel has been enabled.
* 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;
void ac_init_llvm_once(void)
{
call_once(&ac_init_llvm_target_once_flag, ac_init_llvm_target);
}
static LLVMTargetRef ac_get_llvm_target(const char *triple)
--
2.20.1
More information about the mesa-dev
mailing list