#include "clang/Basic/Version.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/Error.h"
#include <cstdint>
#include <cstdio>
#include <memory>
usingnamespacellvm;
static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden);
static void PrintVersion(raw_ostream &OS) { … }
static cl::OptionCategory NVPTXArchCategory("nvptx-arch options");
CUresult;
CUdevice_attribute;
CUdevice;
CUresult (*cuInit)(unsigned int);
CUresult (*cuDeviceGetCount)(int *);
CUresult (*cuGetErrorString)(CUresult, const char **);
CUresult (*cuDeviceGet)(CUdevice *, int);
CUresult (*cuDeviceGetAttribute)(int *, CUdevice_attribute, CUdevice);
constexpr const char *DynamicCudaPath = …;
llvm::Error loadCUDA() { … }
static int handleError(CUresult Err) { … }
int main(int argc, char *argv[]) { … }