[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / flang / unittests / Optimizer / Builder / Runtime / StopTest.cpp
blobfe439bb400e79007f2c548454cb9c94374c07cd0
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 //===----------------------------------------------------------------------===//
9 #include "flang/Optimizer/Builder/Runtime/Stop.h"
10 #include "RuntimeCallTestBase.h"
11 #include "gtest/gtest.h"
13 TEST_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);