#include "llvm/Target/TargetOptions.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Target/TargetMachine.h"
#include "gtest/gtest.h"
usingnamespacellvm;
namespace llvm {
void initializeTestPassPass(PassRegistry &);
}
namespace {
void initLLVM() { … }
std::unique_ptr<TargetMachine> createTargetMachine(bool EnableIPRA) { … }
TargetOptionsTest;
static void targetOptionsTest(bool EnableIPRA) { … }
}
TEST(TargetOptionsTest, IPRASetToOff) { … }
TEST(TargetOptionsTest, IPRASetToOn) { … }
int main(int argc, char **argv) { … }