diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index 34c0fad45fc499..373f844b239081 100644 --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -6995,7 +6995,7 @@ bool AArch64AsmParser::parseDirectiveArch(SMLoc L) { }); if (It == std::end(ExtensionMap)) - Error(CurLoc, "unsupported architectural extension: " + Name); + return Error(CurLoc, "unsupported architectural extension: " + Name); if (EnableFeature) STI.SetFeatureBitsTransitively(It->Features);