Skip to content

Commit 1068780

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:d38ea8c4c84be9496249098053599c24b87f1376 into amd-gfx:2b2731b835aa
Local branch amd-gfx 2b2731b Merged main:30d0850e0f780b17a37522e6503c98ebe197c5fa into amd-gfx:c4099e191a09 Remote branch main d38ea8c [lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target (llvm#92413)
2 parents 2b2731b + d38ea8c commit 1068780

File tree

24 files changed

+278
-59
lines changed

24 files changed

+278
-59
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,8 @@ Bug Fixes to C++ Support
737737
templates during partial ordering when deducing template arguments from a function declaration or when
738738
taking the address of a function template.
739739
- Fix a bug with checking constrained non-type template parameters for equivalence. Fixes (#GH77377).
740+
- Fix a bug where the last argument was not considered when considering the most viable function for
741+
explicit object argument member functions. Fixes (#GH92188).
740742

741743
Bug Fixes to AST Handling
742744
^^^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Lex/Preprocessor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ class Preprocessor {
10101010
llvm::FoldingSet<ModuleMacro> ModuleMacros;
10111011

10121012
/// The names of potential module macros that we've not yet processed.
1013-
llvm::SmallVector<const IdentifierInfo *, 32> PendingModuleMacroNames;
1013+
llvm::SmallVector<IdentifierInfo *, 32> PendingModuleMacroNames;
10141014

10151015
/// The list of module macros, for each identifier, that are not overridden by
10161016
/// any other module macro.
@@ -1432,7 +1432,7 @@ class Preprocessor {
14321432
MacroDirective *MD);
14331433

14341434
/// Register an exported macro for a module and identifier.
1435-
ModuleMacro *addModuleMacro(Module *Mod, const IdentifierInfo *II,
1435+
ModuleMacro *addModuleMacro(Module *Mod, IdentifierInfo *II,
14361436
MacroInfo *Macro,
14371437
ArrayRef<ModuleMacro *> Overrides, bool &IsNew);
14381438
ModuleMacro *getModuleMacro(Module *Mod, const IdentifierInfo *II);

clang/lib/Lex/PPLexerChange.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ Module *Preprocessor::LeaveSubmodule(bool ForPragma) {
804804
llvm::SmallPtrSet<const IdentifierInfo*, 8> VisitedMacros;
805805
for (unsigned I = Info.OuterPendingModuleMacroNames;
806806
I != PendingModuleMacroNames.size(); ++I) {
807-
const auto *II = PendingModuleMacroNames[I];
807+
auto *II = PendingModuleMacroNames[I];
808808
if (!VisitedMacros.insert(II).second)
809809
continue;
810810

clang/lib/Lex/PPMacroExpansion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void Preprocessor::setLoadedMacroDirective(IdentifierInfo *II,
129129
II->setHasMacroDefinition(false);
130130
}
131131

132-
ModuleMacro *Preprocessor::addModuleMacro(Module *Mod, const IdentifierInfo *II,
132+
ModuleMacro *Preprocessor::addModuleMacro(Module *Mod, IdentifierInfo *II,
133133
MacroInfo *Macro,
134134
ArrayRef<ModuleMacro *> Overrides,
135135
bool &New) {
@@ -162,7 +162,7 @@ ModuleMacro *Preprocessor::addModuleMacro(Module *Mod, const IdentifierInfo *II,
162162
// The new macro is always a leaf macro.
163163
LeafMacros.push_back(MM);
164164
// The identifier now has defined macros (that may or may not be visible).
165-
const_cast<IdentifierInfo *>(II)->setHasMacroDefinition(true);
165+
II->setHasMacroDefinition(true);
166166

167167
New = true;
168168
return MM;

clang/lib/Sema/Sema.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2462,7 +2462,7 @@ bool Sema::tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy,
24622462
const OverloadExpr *Overloads = nullptr;
24632463
bool IsMemExpr = false;
24642464
if (E.getType() == Context.OverloadTy) {
2465-
OverloadExpr::FindResult FR = OverloadExpr::find(const_cast<Expr*>(&E));
2465+
OverloadExpr::FindResult FR = OverloadExpr::find(&E);
24662466

24672467
// Ignore overloads that are pointer-to-member constants.
24682468
if (FR.HasFormOfMemberPointer)

clang/lib/Sema/SemaTemplateDeduction.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5638,7 +5638,8 @@ static bool isAtLeastAsSpecializedAs(Sema &S, SourceLocation Loc,
56385638
/// function templates.
56395639
///
56405640
/// \param NumCallArguments1 The number of arguments in the call to FT1, used
5641-
/// only when \c TPOC is \c TPOC_Call.
5641+
/// only when \c TPOC is \c TPOC_Call. Does not include the object argument when
5642+
/// calling a member function.
56425643
///
56435644
/// \param RawObj1Ty The type of the object parameter of FT1 if a member
56445645
/// function only used if \c TPOC is \c TPOC_Call and FT1 is a Function
@@ -5707,7 +5708,11 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate(
57075708
IsRValRef1);
57085709
Args2.push_back(Obj2Ty);
57095710
}
5710-
size_t NumComparedArguments = NumCallArguments1 + ShouldConvert1;
5711+
size_t NumComparedArguments = NumCallArguments1;
5712+
// Either added an argument above or the prototype includes an explicit
5713+
// object argument we need to count
5714+
if (Method1)
5715+
++NumComparedArguments;
57115716

57125717
Args1.insert(Args1.end(), Proto1->param_type_begin(),
57135718
Proto1->param_type_end());

clang/test/SemaCXX/cxx2b-deducing-this.cpp

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,3 +836,60 @@ int h() {
836836
}();
837837
}
838838
}
839+
840+
namespace GH92188 {
841+
struct A {
842+
template<auto N>
843+
void operator+=(this auto &&, const char (&)[N]);
844+
void operator+=(this auto &&, auto &&) = delete;
845+
846+
void f1(this A &, auto &);
847+
void f1(this A &, auto &&) = delete;
848+
849+
void f2(this auto&);
850+
void f2(this auto&&) = delete;
851+
852+
void f3(auto&) &;
853+
void f3(this A&, auto&&) = delete;
854+
855+
void f4(auto&&) & = delete;
856+
void f4(this A&, auto&);
857+
858+
static void f5(auto&);
859+
void f5(this A&, auto&&) = delete;
860+
861+
static void f6(auto&&) = delete;
862+
void f6(this A&, auto&);
863+
864+
void implicit_this() {
865+
int lval;
866+
operator+=("123");
867+
f1(lval);
868+
f2();
869+
f3(lval);
870+
f4(lval);
871+
f5(lval);
872+
f6(lval);
873+
}
874+
875+
void operator-(this A&, auto&&) = delete;
876+
friend void operator-(A&, auto&);
877+
878+
void operator*(this A&, auto&);
879+
friend void operator*(A&, auto&&) = delete;
880+
};
881+
882+
void g() {
883+
A a;
884+
int lval;
885+
a += "123";
886+
a.f1(lval);
887+
a.f2();
888+
a.f3(lval);
889+
a.f4(lval);
890+
a.f5(lval);
891+
a.f6(lval);
892+
a - lval;
893+
a * lval;
894+
}
895+
}

flang/test/Transforms/debug-line-table-inc-file.fir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module attributes {} {
3030
// CHECK: #[[MODULE_LOC]] = loc("{{.*}}simple.f90":0:0)
3131
// CHECK: #[[LOC_INC_FILE:.*]] = loc("{{.*}}inc.f90":1:1)
3232
// CHECK: #[[LOC_FILE:.*]] = loc("{{.*}}simple.f90":3:1)
33-
// CHECK: #[[DI_CU:.*]] = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #[[DI_FILE]], producer = "flang{{.*}}", isOptimized = false, emissionKind = LineTablesOnly>
33+
// CHECK: #[[DI_CU:.*]] = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #[[DI_FILE]], producer = "{{.*}}flang{{.*}}", isOptimized = false, emissionKind = LineTablesOnly>
3434
// CHECK: #[[DI_SP_INC:.*]] = #llvm.di_subprogram<id = distinct[{{.*}}]<>, compileUnit = #[[DI_CU]], scope = #[[DI_FILE]], name = "sinc", linkageName = "_QPsinc", file = #[[DI_INC_FILE]], {{.*}}>
3535
// CHECK: #[[DI_SP:.*]] = #llvm.di_subprogram<id = distinct[{{.*}}]<>, compileUnit = #[[DI_CU]], scope = #[[DI_FILE]], name = "_QQmain", linkageName = "_QQmain", file = #[[DI_FILE]], {{.*}}>
3636
// CHECK: #[[FUSED_LOC_INC_FILE]] = loc(fused<#[[DI_SP_INC]]>[#[[LOC_INC_FILE]]])

flang/test/Transforms/debug-line-table.fir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ module attributes { fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", llvm.dat
2424
// CHECK: #[[MODULE_LOC]] = loc("[[DIR_NAME]]/[[FILE_NAME]]":1:1)
2525
// CHECK: #[[SB_LOC]] = loc("./simple.f90":2:1)
2626
// CHECK: #[[DECL_LOC:.*]] = loc("./simple.f90":10:1)
27-
// FULL: #di_compile_unit = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "flang{{.*}}", isOptimized = false, emissionKind = Full>
28-
// OPT: #di_compile_unit = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "flang{{.*}}", isOptimized = true, emissionKind = Full>
29-
// LINETABLE: #di_compile_unit = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "flang{{.*}}", isOptimized = false, emissionKind = LineTablesOnly>
27+
// FULL: #di_compile_unit = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "{{.*}}flang{{.*}}", isOptimized = false, emissionKind = Full>
28+
// OPT: #di_compile_unit = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "{{.*}}flang{{.*}}", isOptimized = true, emissionKind = Full>
29+
// LINETABLE: #di_compile_unit = #llvm.di_compile_unit<id = distinct[{{.*}}]<>, sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "{{.*}}flang{{.*}}", isOptimized = false, emissionKind = LineTablesOnly>
3030
// CHECK: #di_subroutine_type = #llvm.di_subroutine_type<callingConvention = DW_CC_normal, types = #di_basic_type, #di_basic_type>
3131
// CHECK: #[[SB_SUBPROGRAM:.*]] = #llvm.di_subprogram<id = distinct[{{.*}}]<>, compileUnit = #di_compile_unit, scope = #di_file, name = "[[SB_NAME]]", linkageName = "[[SB_NAME]]", file = #di_file, line = 1, scopeLine = 1, subprogramFlags = "Definition|Optimized", type = #di_subroutine_type>
3232
// CHECK: #[[DECL_SUBPROGRAM:.*]] = #llvm.di_subprogram<scope = #di_file, name = "[[DECL_NAME]]", linkageName = "[[DECL_NAME]]", file = #di_file, line = 1, scopeLine = 1, subprogramFlags = Optimized, type = #di_subroutine_type>

lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ def _set_up_inferior(self):
1717
# Use a shim to ensure that the process is ready to be attached from
1818
# the get-go.
1919
self._exe_to_run = "shim"
20-
self._run_args = [self.getBuildArtifact(self._exe_to_attach)]
20+
self._exe_to_attach = lldbutil.install_to_target(
21+
self, self.getBuildArtifact(self._exe_to_attach)
22+
)
23+
self._run_args = [self._exe_to_attach]
2124
self.build(dictionary={"EXE": self._exe_to_run, "CXX_SOURCES": "shim.cpp"})
2225
else:
2326
self._exe_to_run = self._exe_to_attach

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 499044
19+
#define LLVM_MAIN_REVISION 499054
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/lib/Support/CommandLine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ SubCommand *CommandLineParser::LookupSubCommand(StringRef Name,
534534
if (S->getName().empty())
535535
continue;
536536

537-
if (StringRef(S->getName()) == StringRef(Name))
537+
if (S->getName() == Name)
538538
return S;
539539

540540
if (!NearestMatch && S->getName().edit_distance(Name) < 2)

mlir/include/mlir/Transforms/RegionUtils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ LogicalResult eraseUnreachableBlocks(RewriterBase &rewriter,
8787
LogicalResult runRegionDCE(RewriterBase &rewriter,
8888
MutableArrayRef<Region> regions);
8989

90-
/// Get a topologically sorted list of blocks of the given region.
91-
SetVector<Block *> getTopologicallySortedBlocks(Region &region);
90+
/// Get a list of blocks that is sorted according to dominance. This sort is
91+
/// stable.
92+
SetVector<Block *> getBlocksSortedByDominance(Region &region);
9293

9394
} // namespace mlir
9495

mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
1818
#include "mlir/IR/BuiltinAttributes.h"
1919
#include "mlir/IR/BuiltinTypes.h"
20+
#include "mlir/IR/DialectResourceBlobManager.h"
2021
#include "llvm/ADT/APInt.h"
2122
#include "llvm/ADT/ArrayRef.h"
2223
#include "llvm/ADT/STLExtras.h"
@@ -229,16 +230,41 @@ struct ConstantCompositeOpPattern final
229230
if (!srcType || srcType.getNumElements() == 1)
230231
return failure();
231232

232-
// arith.constant should only have vector or tenor types.
233-
assert((isa<VectorType, RankedTensorType>(srcType)));
233+
// arith.constant should only have vector or tensor types. This is a MLIR
234+
// wide problem at the moment.
235+
if (!isa<VectorType, RankedTensorType>(srcType))
236+
return rewriter.notifyMatchFailure(constOp, "unsupported ShapedType");
234237

235238
Type dstType = getTypeConverter()->convertType(srcType);
236239
if (!dstType)
237240
return failure();
238241

239-
auto dstElementsAttr = dyn_cast<DenseElementsAttr>(constOp.getValue());
240-
if (!dstElementsAttr)
241-
return failure();
242+
// Import the resource into the IR to make use of the special handling of
243+
// element types later on.
244+
mlir::DenseElementsAttr dstElementsAttr;
245+
if (auto denseElementsAttr =
246+
dyn_cast<DenseElementsAttr>(constOp.getValue())) {
247+
dstElementsAttr = denseElementsAttr;
248+
} else if (auto resourceAttr =
249+
dyn_cast<DenseResourceElementsAttr>(constOp.getValue())) {
250+
251+
AsmResourceBlob *blob = resourceAttr.getRawHandle().getBlob();
252+
if (!blob)
253+
return constOp->emitError("could not find resource blob");
254+
255+
ArrayRef<char> ptr = blob->getData();
256+
257+
// Check that the buffer meets the requirements to get converted to a
258+
// DenseElementsAttr
259+
bool detectedSplat = false;
260+
if (!DenseElementsAttr::isValidRawBuffer(srcType, ptr, detectedSplat))
261+
return constOp->emitError("resource is not a valid buffer");
262+
263+
dstElementsAttr =
264+
DenseElementsAttr::getFromRawBuffer(resourceAttr.getType(), ptr);
265+
} else {
266+
return constOp->emitError("unsupported elements attribute");
267+
}
242268

243269
ShapedType dstAttrType = dstElementsAttr.getType();
244270

mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ DenseMap<Operation *, unsigned>
333333
generateOperationNumbering(FunctionOpInterface function) {
334334
unsigned index = 0;
335335
SetVector<Block *> blocks =
336-
getTopologicallySortedBlocks(function.getFunctionBody());
336+
getBlocksSortedByDominance(function.getFunctionBody());
337337
DenseMap<Operation *, unsigned> operationToIndexMap;
338338
for (Block *block : blocks) {
339339
index++; // We want block args to have their own number.

mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,10 @@ getTransferFoldableInnerUnitDims(MemRefType srcType, VectorType vectorType) {
12371237
if (failed(getStridesAndOffset(srcType, srcStrides, srcOffset)))
12381238
return failure();
12391239

1240+
auto isUnitDim = [](VectorType type, int dim) {
1241+
return type.getDimSize(dim) == 1 && !type.getScalableDims()[dim];
1242+
};
1243+
12401244
// According to vector.transfer_read/write semantics, the vector can be a
12411245
// slice. Thus, we have to offset the check index with `rankDiff` in
12421246
// `srcStrides` and source dim sizes.
@@ -1247,8 +1251,7 @@ getTransferFoldableInnerUnitDims(MemRefType srcType, VectorType vectorType) {
12471251
// It can be folded only if they are 1 and the stride is 1.
12481252
int dim = vectorType.getRank() - i - 1;
12491253
if (srcStrides[dim + rankDiff] != 1 ||
1250-
srcType.getDimSize(dim + rankDiff) != 1 ||
1251-
vectorType.getDimSize(dim) != 1)
1254+
srcType.getDimSize(dim + rankDiff) != 1 || !isUnitDim(vectorType, dim))
12521255
break;
12531256
result++;
12541257
}
@@ -1292,7 +1295,8 @@ class DropInnerMostUnitDimsTransferRead
12921295

12931296
auto resultTargetVecType =
12941297
VectorType::get(targetType.getShape().drop_back(dimsToDrop),
1295-
targetType.getElementType());
1298+
targetType.getElementType(),
1299+
targetType.getScalableDims().drop_back(dimsToDrop));
12961300

12971301
auto loc = readOp.getLoc();
12981302
SmallVector<OpFoldResult> sizes =
@@ -1378,7 +1382,8 @@ class DropInnerMostUnitDimsTransferWrite
13781382

13791383
auto resultTargetVecType =
13801384
VectorType::get(targetType.getShape().drop_back(dimsToDrop),
1381-
targetType.getElementType());
1385+
targetType.getElementType(),
1386+
targetType.getScalableDims().drop_back(dimsToDrop));
13821387

13831388
Location loc = writeOp.getLoc();
13841389
SmallVector<OpFoldResult> sizes =

mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static LogicalResult convertDataOp(acc::DataOp &op,
392392
llvm::BasicBlock *endDataBlock = llvm::BasicBlock::Create(
393393
ctx, "acc.end_data", builder.GetInsertBlock()->getParent());
394394

395-
SetVector<Block *> blocks = getTopologicallySortedBlocks(op.getRegion());
395+
SetVector<Block *> blocks = getBlocksSortedByDominance(op.getRegion());
396396
for (Block *bb : blocks) {
397397
llvm::BasicBlock *llvmBB = moduleTranslation.lookupBlock(bb);
398398
if (bb->isEntryBlock()) {

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

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static llvm::BasicBlock *convertOmpOpRegions(
199199

200200
// Convert blocks one by one in topological order to ensure
201201
// defs are converted before uses.
202-
SetVector<Block *> blocks = getTopologicallySortedBlocks(region);
202+
SetVector<Block *> blocks = getBlocksSortedByDominance(region);
203203
for (Block *bb : blocks) {
204204
llvm::BasicBlock *llvmBB = moduleTranslation.lookupBlock(bb);
205205
// Retarget the branch of the entry block to the entry block of the
@@ -2153,40 +2153,38 @@ getFirstOrLastMappedMemberPtr(mlir::omp::MapInfoOp mapInfo, bool first) {
21532153
llvm::SmallVector<size_t> indices(shape[0]);
21542154
std::iota(indices.begin(), indices.end(), 0);
21552155

2156-
llvm::sort(
2157-
indices.begin(), indices.end(), [&](const size_t a, const size_t b) {
2158-
auto indexValues = indexAttr.getValues<int32_t>();
2159-
for (int i = 0;
2160-
i < shape[1];
2161-
++i) {
2162-
int aIndex = indexValues[a * shape[1] + i];
2163-
int bIndex = indexValues[b * shape[1] + i];
2156+
llvm::sort(indices.begin(), indices.end(),
2157+
[&](const size_t a, const size_t b) {
2158+
auto indexValues = indexAttr.getValues<int32_t>();
2159+
for (int i = 0; i < shape[1]; ++i) {
2160+
int aIndex = indexValues[a * shape[1] + i];
2161+
int bIndex = indexValues[b * shape[1] + i];
21642162

2165-
if (aIndex == bIndex)
2166-
continue;
2163+
if (aIndex == bIndex)
2164+
continue;
21672165

2168-
if (aIndex != -1 && bIndex == -1)
2169-
return false;
2166+
if (aIndex != -1 && bIndex == -1)
2167+
return false;
21702168

2171-
if (aIndex == -1 && bIndex != -1)
2172-
return true;
2169+
if (aIndex == -1 && bIndex != -1)
2170+
return true;
21732171

2174-
// A is earlier in the record type layout than B
2175-
if (aIndex < bIndex)
2176-
return first;
2172+
// A is earlier in the record type layout than B
2173+
if (aIndex < bIndex)
2174+
return first;
21772175

2178-
if (bIndex < aIndex)
2179-
return !first;
2180-
}
2176+
if (bIndex < aIndex)
2177+
return !first;
2178+
}
21812179

2182-
// Iterated the entire list and couldn't make a decision, all elements
2183-
// were likely the same. Return false, since the sort comparator should
2184-
// return false for equal elements.
2185-
return false;
2186-
});
2180+
// Iterated the entire list and couldn't make a decision, all
2181+
// elements were likely the same. Return false, since the sort
2182+
// comparator should return false for equal elements.
2183+
return false;
2184+
});
21872185

2188-
return llvm::cast<mlir::omp::MapInfoOp>(
2189-
mapInfo.getMembers()[indices.front()].getDefiningOp());
2186+
return llvm::cast<mlir::omp::MapInfoOp>(
2187+
mapInfo.getMembers()[indices.front()].getDefiningOp());
21902188
}
21912189

21922190
/// This function calculates the array/pointer offset for map data provided

0 commit comments

Comments
 (0)