summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/CodeGen')
-rw-r--r--llvm/unittests/CodeGen/TargetOptionsTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/CodeGen/TargetOptionsTest.cpp b/llvm/unittests/CodeGen/TargetOptionsTest.cpp
index 93538c06306..70ef5e13c1e 100644
--- a/llvm/unittests/CodeGen/TargetOptionsTest.cpp
+++ b/llvm/unittests/CodeGen/TargetOptionsTest.cpp
@@ -49,9 +49,9 @@ static void targetOptionsTest(bool EnableIPRA) {
if (!TM)
return;
legacy::PassManager PM;
- LLVMTargetMachine &LLVMTM = static_cast<LLVMTargetMachine &>(*TM);
+ LLVMTargetMachine *LLVMTM = static_cast<LLVMTargetMachine *>(TM.get());
- TargetPassConfig &TPC = *LLVMTM.createPassConfig(PM);
+ TargetPassConfig &TPC = *LLVMTM->createPassConfig(PM);
(void)TPC;
ASSERT_TRUE(TM->Options.EnableIPRA == EnableIPRA);
OpenPOWER on IntegriCloud