Skip to content

Commit 88ac6d0

Browse files
committed
fix llvm unittests
1 parent af029c8 commit 88ac6d0

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

llvm/unittests/Frontend/OpenMPDecompositionTest.cpp

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -686,12 +686,12 @@ TEST_F(OpenMPDecompositionTest, Order1) {
686686
std::string Dir3 = stringify(Dec.output[3]);
687687
std::string Dir4 = stringify(Dec.output[4]);
688688
std::string Dir5 = stringify(Dec.output[5]);
689-
ASSERT_EQ(Dir0, "target"); // (31)
690-
ASSERT_EQ(Dir1, "teams"); // (31)
689+
ASSERT_EQ(Dir0, "target"); // (31)
690+
ASSERT_EQ(Dir1, "teams"); // (31)
691691
ASSERT_EQ(Dir2, "distribute order(1, 0)"); // (31)
692-
ASSERT_EQ(Dir3, "parallel"); // (31)
693-
ASSERT_EQ(Dir4, "for order(1, 0)"); // (31)
694-
ASSERT_EQ(Dir5, "simd order(1, 0)"); // (31)
692+
ASSERT_EQ(Dir3, "parallel"); // (31)
693+
ASSERT_EQ(Dir4, "for order(1, 0)"); // (31)
694+
ASSERT_EQ(Dir5, "simd order(1, 0)"); // (31)
695695
}
696696

697697
// ALLOCATE
@@ -708,8 +708,7 @@ TEST_F(OpenMPDecompositionTest, Allocate1) {
708708

709709
// Allocate + firstprivate
710710
omp::List<omp::Clause> Clauses{
711-
{OMPC_allocate,
712-
omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
711+
{OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}},
713712
{OMPC_firstprivate, omp::clause::Firstprivate{{x}}},
714713
};
715714

@@ -719,8 +718,8 @@ TEST_F(OpenMPDecompositionTest, Allocate1) {
719718

720719
std::string Dir0 = stringify(Dec.output[0]);
721720
std::string Dir1 = stringify(Dec.output[1]);
722-
ASSERT_EQ(Dir0, "parallel shared(x)"); // (33)
723-
ASSERT_EQ(Dir1, "sections firstprivate(x) allocate(, , , (x))"); // (33)
721+
ASSERT_EQ(Dir0, "parallel shared(x)"); // (33)
722+
ASSERT_EQ(Dir1, "sections firstprivate(x) allocate(, , (x))"); // (33)
724723
}
725724

726725
TEST_F(OpenMPDecompositionTest, Allocate2) {
@@ -729,8 +728,7 @@ TEST_F(OpenMPDecompositionTest, Allocate2) {
729728

730729
// Allocate + in_reduction
731730
omp::List<omp::Clause> Clauses{
732-
{OMPC_allocate,
733-
omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
731+
{OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}},
734732
{OMPC_in_reduction, omp::clause::InReduction{{{Add}, {x}}}},
735733
};
736734

@@ -740,17 +738,16 @@ TEST_F(OpenMPDecompositionTest, Allocate2) {
740738

741739
std::string Dir0 = stringify(Dec.output[0]);
742740
std::string Dir1 = stringify(Dec.output[1]);
743-
ASSERT_EQ(Dir0, "target in_reduction((3), (x)) allocate(, , , (x))"); // (33)
744-
ASSERT_EQ(Dir1, "parallel"); // (33)
741+
ASSERT_EQ(Dir0, "target in_reduction((3), (x)) allocate(, , (x))"); // (33)
742+
ASSERT_EQ(Dir1, "parallel"); // (33)
745743
}
746744

747745
TEST_F(OpenMPDecompositionTest, Allocate3) {
748746
omp::Object x{"x"};
749747

750748
// Allocate + linear
751749
omp::List<omp::Clause> Clauses{
752-
{OMPC_allocate,
753-
omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
750+
{OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}},
754751
{OMPC_linear,
755752
omp::clause::Linear{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
756753
};
@@ -765,16 +762,15 @@ TEST_F(OpenMPDecompositionTest, Allocate3) {
765762
// should be fixed eventually.
766763
ASSERT_EQ(Dir0, "parallel shared(x) shared(x)"); // (33)
767764
ASSERT_EQ(Dir1, "for linear(, , , (x)) firstprivate(x) lastprivate(, (x)) "
768-
"allocate(, , , (x))"); // (33)
765+
"allocate(, , (x))"); // (33)
769766
}
770767

771768
TEST_F(OpenMPDecompositionTest, Allocate4) {
772769
omp::Object x{"x"};
773770

774771
// Allocate + lastprivate
775772
omp::List<omp::Clause> Clauses{
776-
{OMPC_allocate,
777-
omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
773+
{OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}},
778774
{OMPC_lastprivate, omp::clause::Lastprivate{{std::nullopt, {x}}}},
779775
};
780776

@@ -784,17 +780,16 @@ TEST_F(OpenMPDecompositionTest, Allocate4) {
784780

785781
std::string Dir0 = stringify(Dec.output[0]);
786782
std::string Dir1 = stringify(Dec.output[1]);
787-
ASSERT_EQ(Dir0, "parallel shared(x)"); // (33)
788-
ASSERT_EQ(Dir1, "sections lastprivate(, (x)) allocate(, , , (x))"); // (33)
783+
ASSERT_EQ(Dir0, "parallel shared(x)"); // (33)
784+
ASSERT_EQ(Dir1, "sections lastprivate(, (x)) allocate(, , (x))"); // (33)
789785
}
790786

791787
TEST_F(OpenMPDecompositionTest, Allocate5) {
792788
omp::Object x{"x"};
793789

794790
// Allocate + private
795791
omp::List<omp::Clause> Clauses{
796-
{OMPC_allocate,
797-
omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
792+
{OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}},
798793
{OMPC_private, omp::clause::Private{{x}}},
799794
};
800795

@@ -804,8 +799,8 @@ TEST_F(OpenMPDecompositionTest, Allocate5) {
804799

805800
std::string Dir0 = stringify(Dec.output[0]);
806801
std::string Dir1 = stringify(Dec.output[1]);
807-
ASSERT_EQ(Dir0, "parallel"); // (33)
808-
ASSERT_EQ(Dir1, "sections private(x) allocate(, , , (x))"); // (33)
802+
ASSERT_EQ(Dir0, "parallel"); // (33)
803+
ASSERT_EQ(Dir1, "sections private(x) allocate(, , (x))"); // (33)
809804
}
810805

811806
TEST_F(OpenMPDecompositionTest, Allocate6) {
@@ -814,8 +809,7 @@ TEST_F(OpenMPDecompositionTest, Allocate6) {
814809

815810
// Allocate + reduction
816811
omp::List<omp::Clause> Clauses{
817-
{OMPC_allocate,
818-
omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}},
812+
{OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}},
819813
{OMPC_reduction, omp::clause::Reduction{{std::nullopt, {Add}, {x}}}},
820814
};
821815

@@ -825,8 +819,8 @@ TEST_F(OpenMPDecompositionTest, Allocate6) {
825819

826820
std::string Dir0 = stringify(Dec.output[0]);
827821
std::string Dir1 = stringify(Dec.output[1]);
828-
ASSERT_EQ(Dir0, "parallel shared(x)"); // (33)
829-
ASSERT_EQ(Dir1, "sections reduction(, (3), (x)) allocate(, , , (x))"); // (33)
822+
ASSERT_EQ(Dir0, "parallel shared(x)"); // (33)
823+
ASSERT_EQ(Dir1, "sections reduction(, (3), (x)) allocate(, , (x))"); // (33)
830824
}
831825

832826
// REDUCTION

0 commit comments

Comments
 (0)