Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 80e78fcce86de0288793a0ef0f6acf37656ee4cf authored by Linus Torvalds on 11 September 2022, 20:22:01 UTC
Linux 6.0-rc5
Tip revision: 80e78fc
test-llvm-version.cpp
// SPDX-License-Identifier: GPL-2.0
#include <cstdio>
#include "llvm/Config/llvm-config.h"

#define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH)
#define pass int main() {printf("%x\n", NUM_VERSION); return 0;}

#if NUM_VERSION >= 0x030900
pass
#else
# error This LLVM is not tested yet.
#endif
back to top