From 5cc6491f50d0598715d87c69793bfdb2df7cda6f Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Sat, 18 Jun 2011 13:51:54 +0000 Subject: [PATCH] MC: Allow .common as alias for .comm assembler directive. PR10116. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133349 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCParser/AsmParser.cpp | 2 +- test/MC/AsmParser/directive_comm.s | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index bbd66351089..7b62db2e69d 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -1146,7 +1146,7 @@ bool AsmParser::ParseStatement() { if (IDVal == ".weak_def_can_be_hidden") return ParseDirectiveSymbolAttribute(MCSA_WeakDefAutoPrivate); - if (IDVal == ".comm") + if (IDVal == ".comm" || IDVal == ".common") return ParseDirectiveComm(/*IsLocal=*/false); if (IDVal == ".lcomm") return ParseDirectiveComm(/*IsLocal=*/true); diff --git a/test/MC/AsmParser/directive_comm.s b/test/MC/AsmParser/directive_comm.s index 6cc79371de8..5e60ab75705 100644 --- a/test/MC/AsmParser/directive_comm.s +++ b/test/MC/AsmParser/directive_comm.s @@ -3,6 +3,8 @@ # CHECK: TEST0: # CHECK: .comm a,6,2 # CHECK: .comm b,8 +# CHECK: .comm c,8 TEST0: .comm a, 4+2, 2 .comm b,8 + .common c,8