Skip to content

Commit 83927a6

Browse files
authored
[Modules] Fix LLVM_ENABLE_MODULES build (NFC) (llvm#164402)
FileOffset.h uses uint64_t but only includes <cstdlib>, which is not specified to provide the uint64_t type. This happens to work without LLVM_ENABLE_MODULES enabled due to transitive includes from <cstdlib>. With LLVM_ENABLE_MODULES enabled, declarations from transitive includes are not visible by default, and the build fails. This fixes LLVM_ENABLE_MODULES builds by including the proper header, <cstdint>, instead.
1 parent 20675ee commit 83927a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/CAS/FileOffset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef LLVM_CAS_FILEOFFSET_H
1616
#define LLVM_CAS_FILEOFFSET_H
1717

18-
#include <cstdlib>
18+
#include <cstdint>
1919

2020
namespace llvm::cas {
2121

0 commit comments

Comments
 (0)