Basic: query the target pointer width from clang

Use the `clang::TargetInfo` to query the target pointer size for the
given triple. This is meant to enable us to properly determine
`CMAKE_SIZEOF_VOID_P`.
This commit is contained in:
Saleem Abdulrasool
2025-02-07 12:42:00 -08:00
parent 024f4bbd21
commit a04c75a43a
4 changed files with 52 additions and 16 deletions

View File

@@ -33,7 +33,8 @@ namespace targetinfo {
void printTargetInfo(const CompilerInvocation &invocation,
llvm::raw_ostream &out);
void printTripleInfo(const llvm::Triple &triple,
void printTripleInfo(const CompilerInvocation &invocation,
const llvm::Triple &triple,
std::optional<llvm::VersionTuple> runtimeVersion,
llvm::raw_ostream &out);
} // namespace targetinfo