#include "clang/Basic/Version.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DynamicLibrary.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include <string>
#include <vector>
usingnamespacellvm;
hsa_status_t;
hsa_device_type_t;
hsa_agent_info_t;
hsa_agent_t;
hsa_status_t (*hsa_init)();
hsa_status_t (*hsa_shut_down)();
hsa_status_t (*hsa_agent_get_info)(hsa_agent_t, hsa_agent_info_t, void *);
hsa_status_t (*hsa_iterate_agents)(hsa_status_t (*)(hsa_agent_t, void *),
void *);
constexpr const char *DynamicHSAPath = …;
llvm::Error loadHSA() { … }
static hsa_status_t iterateAgentsCallback(hsa_agent_t Agent, void *Data) { … }
int printGPUsByHSA() { … }