[MC] [llvm-ml] Add support for the extrn keyword
authorMike Hommey <mh@glandium.org>
Thu, 29 Dec 2022 14:47:13 +0000 (14:47 +0000)
committerEric Astor <epastor@google.com>
Thu, 29 Dec 2022 14:47:24 +0000 (14:47 +0000)
It is the same as the already supported `extern` keyword.
https://learn.microsoft.com/en-us/cpp/assembler/masm/extrn?view=msvc-170

Fixes: https://github.com/llvm/llvm-project/issues/59712

Reviewed By: epastor

Differential Revision: https://reviews.llvm.org/D140679

llvm/lib/MC/MCParser/MasmParser.cpp

index 37dc1a3..e7e1d59 100644 (file)
@@ -6720,6 +6720,7 @@ void MasmParser::initializeDirectiveKindMap() {
   DirectiveKindMap["even"] = DK_EVEN;
   DirectiveKindMap["org"] = DK_ORG;
   DirectiveKindMap["extern"] = DK_EXTERN;
+  DirectiveKindMap["extrn"] = DK_EXTERN;
   DirectiveKindMap["public"] = DK_PUBLIC;
   // DirectiveKindMap[".comm"] = DK_COMM;
   DirectiveKindMap["comment"] = DK_COMMENT;