Skip to content

Commit 908669a

Browse files
committed
Fix IRBuilderTest failure.
1 parent 6bba19e commit 908669a

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

clang/lib/CodeGen/CGOpenMPRuntime.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@
3232
#include "llvm/Bitcode/BitcodeReader.h"
3333
#include "llvm/IR/Constants.h"
3434
#include "llvm/IR/DerivedTypes.h"
35-
#include "llvm/IR/Function.h"
3635
#include "llvm/IR/GlobalValue.h"
3736
#include "llvm/IR/InstrTypes.h"
3837
#include "llvm/IR/Value.h"
3938
#include "llvm/Support/AtomicOrdering.h"
40-
#include "llvm/Support/Error.h"
4139
#include "llvm/Support/raw_ostream.h"
4240
#include <cassert>
4341
#include <cstdint>

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "llvm/IR/IRBuilder.h"
2323
#include "llvm/IR/Module.h"
2424
#include "llvm/Support/Allocator.h"
25-
#include "llvm/Support/Error.h"
2625
#include "llvm/TargetParser/Triple.h"
2726
#include <forward_list>
2827
#include <map>

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#include "llvm/IR/Value.h"
4848
#include "llvm/MC/TargetRegistry.h"
4949
#include "llvm/Support/CommandLine.h"
50-
#include "llvm/Support/Error.h"
5150
#include "llvm/Support/ErrorHandling.h"
5251
#include "llvm/Support/FileSystem.h"
5352
#include "llvm/Target/TargetMachine.h"

llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp

+9-6
Original file line numberDiff line numberDiff line change
@@ -6186,8 +6186,9 @@ TEST_F(OpenMPIRBuilderTest, TargetRegion) {
61866186
};
61876187

61886188
auto CustomMapperCB = [&](unsigned int I) { return nullptr; };
6189-
llvm::OpenMPIRBuilder::TargetDataInfo Info(/*RequiresDevicePointerInfo=*/true,
6190-
/*SeparateBeginEndCalls=*/true);
6189+
llvm::OpenMPIRBuilder::TargetDataInfo Info(
6190+
/*RequiresDevicePointerInfo=*/false,
6191+
/*SeparateBeginEndCalls=*/true);
61916192

61926193
TargetRegionEntryInfo EntryInfo("func", 42, 4711, 17);
61936194
OpenMPIRBuilder::LocationDescription OmpLoc({Builder.saveIP(), DL});
@@ -6302,8 +6303,9 @@ TEST_F(OpenMPIRBuilderTest, TargetRegionDevice) {
63026303
F->getEntryBlock().getFirstInsertionPt());
63036304
TargetRegionEntryInfo EntryInfo("parent", /*DeviceID=*/1, /*FileID=*/2,
63046305
/*Line=*/3, /*Count=*/0);
6305-
llvm::OpenMPIRBuilder::TargetDataInfo Info(/*RequiresDevicePointerInfo=*/true,
6306-
/*SeparateBeginEndCalls=*/true);
6306+
llvm::OpenMPIRBuilder::TargetDataInfo Info(
6307+
/*RequiresDevicePointerInfo=*/false,
6308+
/*SeparateBeginEndCalls=*/true);
63076309

63086310
OpenMPIRBuilder::InsertPointOrErrorTy AfterIP = OMPBuilder.createTarget(
63096311
Loc, /*IsOffloadEntry=*/true, EntryIP, EntryIP, Info, EntryInfo,
@@ -6462,8 +6464,9 @@ TEST_F(OpenMPIRBuilderTest, ConstantAllocaRaise) {
64626464
F->getEntryBlock().getFirstInsertionPt());
64636465
TargetRegionEntryInfo EntryInfo("parent", /*DeviceID=*/1, /*FileID=*/2,
64646466
/*Line=*/3, /*Count=*/0);
6465-
llvm::OpenMPIRBuilder::TargetDataInfo Info(/*RequiresDevicePointerInfo=*/true,
6466-
/*SeparateBeginEndCalls=*/true);
6467+
llvm::OpenMPIRBuilder::TargetDataInfo Info(
6468+
/*RequiresDevicePointerInfo=*/false,
6469+
/*SeparateBeginEndCalls=*/true);
64676470

64686471
OpenMPIRBuilder::InsertPointOrErrorTy AfterIP = OMPBuilder.createTarget(
64696472
Loc, /*IsOffloadEntry=*/true, EntryIP, EntryIP, Info, EntryInfo,

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@
2828
#include "llvm/Frontend/OpenMP/OMPConstants.h"
2929
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
3030
#include "llvm/IR/DebugInfoMetadata.h"
31-
#include "llvm/IR/Function.h"
3231
#include "llvm/IR/IRBuilder.h"
3332
#include "llvm/IR/ReplaceConstant.h"
34-
#include "llvm/Support/Error.h"
3533
#include "llvm/Support/FileSystem.h"
3634
#include "llvm/TargetParser/Triple.h"
3735
#include "llvm/Transforms/Utils/ModuleUtils.h"

0 commit comments

Comments
 (0)