1 //===- StopTest.cpp -- Stop runtime builder unit tests ---------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "flang/Optimizer/Builder/Runtime/Stop.h" 10 #include "RuntimeCallTestBase.h" 11 #include "gtest/gtest.h" 12 TEST_F(RuntimeCallTest,genExitTest)13TEST_F(RuntimeCallTest, genExitTest) { 14 mlir::Location loc = firBuilder->getUnknownLoc(); 15 mlir::Value status = firBuilder->createIntegerConstant(loc, i32Ty, 0); 16 fir::runtime::genExit(*firBuilder, loc, status); 17 mlir::Block *block = firBuilder->getBlock(); 18 EXPECT_TRUE(block) << "Failed to retrieve the block!"; 19 checkBlockForCallOp(block, "_FortranAExit", 1); 20 } 21