We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08567bc commit 44f1f72Copy full SHA for 44f1f72
mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp
@@ -198,11 +198,12 @@ static LLVMStructType parseStructType(AsmParser &parser) {
198
if (succeeded(parser.parseOptionalGreater())) {
199
auto type = LLVMStructType::getIdentifiedChecked(
200
[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();
+ if (succeeded(parser.tryStartCyclicParse(type))) {
+ parser.emitError(
+ greaterLoc,
+ "struct without a body only allowed in a recursive struct");
+ return nullptr;
206
+ }
207
208
return type;
209
}
0 commit comments