Skip to content

Commit 61565ab

Browse files
committed
[libc] Fix constant variable initializer
1 parent 9d0a8ed commit 61565ab

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

libc/src/time/gpu/time_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ namespace LIBC_NAMESPACE {
1515
// insufficient.
1616
// TODO: Once we have another use-case for this we should put it in a common
1717
// device environment struct.
18-
extern "C" [[gnu::visibility("protected")]] gpu::Constant<uint64_t>
19-
__llvm_libc_clock_freq = clock_freq;
18+
extern "C" [[gnu::visibility("protected")]] uint64_t __llvm_libc_clock_freq =
19+
clock_freq;
2020
#endif
2121

2222
} // namespace LIBC_NAMESPACE

libc/src/time/gpu/time_utils.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ constexpr uint64_t clock_freq = 100000000UL;
2323

2424
// We provide an externally visible symbol such that the runtime can set
2525
// this to the correct value.
26-
extern "C" [[gnu::visibility("protected")]] gpu::Constant<uint64_t>
27-
__llvm_libc_clock_freq;
26+
extern "C" [[gnu::visibility("protected")]] uint64_t __llvm_libc_clock_freq;
2827
#define GPU_CLOCKS_PER_SEC static_cast<clock_t>(__llvm_libc_clock_freq)
2928

3029
#elif defined(LIBC_TARGET_ARCH_IS_NVPTX)

0 commit comments

Comments
 (0)