Staging
v0.5.1
https://github.com/torvalds/linux
Raw File
Tip revision: 3650b228f83adda7e5ee532e2b90429c03f7b9ec authored by Linus Torvalds on 25 October 2020, 22:14:11 UTC
Linux 5.10-rc1
Tip revision: 3650b22
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