Skip to content

Commit ac3ad83

Browse files
committed
Address comments
1 parent bf0aa8a commit ac3ad83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mlir/include/mlir/Dialect/DLTI/DLTI.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ namespace dlti {
2929
FailureOr<Attribute> query(Operation *op, ArrayRef<DataLayoutEntryKey> keys,
3030
bool emitError = false);
3131

32-
/// Perform a DLTI-query at `op` using string `keys` as DLTI entry keys,
33-
/// recursively querying on query interface-implementing attrs, starting from
34-
/// attr obtained from `op`.
32+
/// Perform a DLTI-query at `op` using each string in `keys` as a separate DLTI
33+
/// entry key, recursively querying on query interface-implementing attrs,
34+
/// starting from attr obtained from `op`.
3535
FailureOr<Attribute> query(Operation *op, ArrayRef<StringRef> keys,
3636
bool emitError = false);
3737
} // namespace dlti

mlir/lib/Dialect/DLTI/DLTI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ FailureOr<Attribute> dlti::query(Operation *op, ArrayRef<StringRef> keys,
571571
return failure();
572572

573573
MLIRContext *ctx = op->getContext();
574-
SmallVector<DataLayoutEntryKey> entryKeys;
574+
SmallVector<DataLayoutEntryKey> entryKeys(keys.size());
575575
for (StringRef key : keys)
576576
entryKeys.push_back(StringAttr::get(ctx, key));
577577

0 commit comments

Comments
 (0)