diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -1244,7 +1244,7 @@ EXPECT_EQ(Loop->getTripCount(), TripCount); BasicBlock *Body = Loop->getBody(); - Instruction *CmpInst = &Body->getInstList().front(); + Instruction *CmpInst = &Body->front(); EXPECT_TRUE(isa(CmpInst)); EXPECT_EQ(CmpInst->getOperand(0), IndVar);