[libc-commits] [libc] 80504b0 - [libc][Obvious] Fix bad macro check on NVPTX tests
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Jul 5 13:54:29 PDT 2023
Author: Joseph Huber
Date: 2023-07-05T15:54:12-05:00
New Revision: 80504b06ad1b2cbca29642306b3463ea86f0a930
URL: https://github.com/llvm/llvm-project/commit/80504b06ad1b2cbca29642306b3463ea86f0a930
DIFF: https://github.com/llvm/llvm-project/commit/80504b06ad1b2cbca29642306b3463ea86f0a930.diff
LOG: [libc][Obvious] Fix bad macro check on NVPTX tests
Summary:
I forgot to add the `defined()` check on NVPTX.
Added:
Modified:
libc/test/UnitTest/LibcTest.cpp
Removed:
################################################################################
diff --git a/libc/test/UnitTest/LibcTest.cpp b/libc/test/UnitTest/LibcTest.cpp
index e1887c459d0d76..d5e6fdfd8e0da5 100644
--- a/libc/test/UnitTest/LibcTest.cpp
+++ b/libc/test/UnitTest/LibcTest.cpp
@@ -18,7 +18,7 @@
#elif defined(LIBC_TARGET_ARCH_IS_GPU)
#include "src/__support/GPU/utils.h"
static long clock() { return __llvm_libc::gpu::fixed_frequency_clock(); }
-#if LIBC_TARGET_ARCH_IS_NVPTX
+#if defined(LIBC_TARGET_ARCH_IS_NVPTX)
uint64_t CLOCKS_PER_SEC = 1000000000UL;
#else
// The AMDGPU loader needs to initialize this at runtime by querying the driver.
More information about the libc-commits
mailing list