diff options
author | Shafik Yaghmour <shafik.yaghmour@intel.com> | 2025-05-13 09:09:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-13 09:09:37 -0700 |
commit | c24890305378979a66ea6d35bee754c03e61178f (patch) | |
tree | d759cc5c91393f2066b6e89bb5759f3fdb83b02a /llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | |
parent | 7a4af40896496064ed34f89bb6a30fc91c3c2f7a (diff) | |
download | llvm-c24890305378979a66ea6d35bee754c03e61178f.zip llvm-c24890305378979a66ea6d35bee754c03e61178f.tar.gz llvm-c24890305378979a66ea6d35bee754c03e61178f.tar.bz2 |
[OpenMP][NFC] Use pass by const ref for Dependencies (#139592)
Static analysis flagged the passing of Dependencies to emitTargetCall as
a
place we could use std::move to avoid copying. A closer look indicated
we could
instead turn the parameter into a const & and not have a default value
since it
was only used in two lines in a test and changing those two locations
was easy.
Diffstat (limited to 'llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp index 1a1bb03..b98dc0c 100644 --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -6604,7 +6604,7 @@ TEST_F(OpenMPIRBuilderTest, TargetRegionSPMD) { Builder.saveIP(), Info, EntryInfo, DefaultAttrs, RuntimeAttrs, /*IfCond=*/nullptr, Inputs, GenMapInfoCB, BodyGenCB, SimpleArgAccessorCB, - CustomMapperCB)); + CustomMapperCB, {})); Builder.restoreIP(AfterIP); OMPBuilder.finalize(); @@ -6706,12 +6706,12 @@ TEST_F(OpenMPIRBuilderTest, TargetRegionDeviceSPMD) { /*RequiresDevicePointerInfo=*/false, /*SeparateBeginEndCalls=*/true); - ASSERT_EXPECTED_INIT( - OpenMPIRBuilder::InsertPointTy, AfterIP, - OMPBuilder.createTarget(Loc, /*IsOffloadEntry=*/true, EntryIP, EntryIP, - Info, EntryInfo, DefaultAttrs, RuntimeAttrs, - /*IfCond=*/nullptr, CapturedArgs, GenMapInfoCB, - BodyGenCB, SimpleArgAccessorCB, CustomMapperCB)); + ASSERT_EXPECTED_INIT(OpenMPIRBuilder::InsertPointTy, AfterIP, + OMPBuilder.createTarget( + Loc, /*IsOffloadEntry=*/true, EntryIP, EntryIP, Info, + EntryInfo, DefaultAttrs, RuntimeAttrs, + /*IfCond=*/nullptr, CapturedArgs, GenMapInfoCB, + BodyGenCB, SimpleArgAccessorCB, CustomMapperCB, {})); Builder.restoreIP(AfterIP); Builder.CreateRetVoid(); |