[libc] Fix constant variable initializer
This commit is contained in:
parent
9d0a8eda0b
commit
61565abcdc
@ -15,8 +15,8 @@ namespace LIBC_NAMESPACE {
|
||||
// insufficient.
|
||||
// TODO: Once we have another use-case for this we should put it in a common
|
||||
// device environment struct.
|
||||
extern "C" [[gnu::visibility("protected")]] gpu::Constant<uint64_t>
|
||||
__llvm_libc_clock_freq = clock_freq;
|
||||
extern "C" [[gnu::visibility("protected")]] uint64_t __llvm_libc_clock_freq =
|
||||
clock_freq;
|
||||
#endif
|
||||
|
||||
} // namespace LIBC_NAMESPACE
|
||||
|
@ -23,8 +23,7 @@ constexpr uint64_t clock_freq = 100000000UL;
|
||||
|
||||
// We provide an externally visible symbol such that the runtime can set
|
||||
// this to the correct value.
|
||||
extern "C" [[gnu::visibility("protected")]] gpu::Constant<uint64_t>
|
||||
__llvm_libc_clock_freq;
|
||||
extern "C" [[gnu::visibility("protected")]] uint64_t __llvm_libc_clock_freq;
|
||||
#define GPU_CLOCKS_PER_SEC static_cast<clock_t>(__llvm_libc_clock_freq)
|
||||
|
||||
#elif defined(LIBC_TARGET_ARCH_IS_NVPTX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user