Skip to content

Commit 44f1f72

Browse files
committed
address review comments
1 parent 08567bc commit 44f1f72

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ static LLVMStructType parseStructType(AsmParser &parser) {
198198
if (succeeded(parser.parseOptionalGreater())) {
199199
auto type = LLVMStructType::getIdentifiedChecked(
200200
[loc] { return emitError(loc); }, loc.getContext(), name);
201-
if (succeeded(parser.tryStartCyclicParse(type)))
202-
return parser.emitError(
203-
greaterLoc,
204-
"struct without a body only allowed in a recursive struct"),
205-
LLVMStructType();
201+
if (succeeded(parser.tryStartCyclicParse(type))) {
202+
parser.emitError(
203+
greaterLoc,
204+
"struct without a body only allowed in a recursive struct");
205+
return nullptr;
206+
}
206207

207208
return type;
208209
}

0 commit comments

Comments
 (0)