[MC] Common symbols weren't being checked for redeclaration which allowed an assembly...
authorColin LeMahieu <colinl@codeaurora.org>
Sat, 6 Jun 2015 20:12:40 +0000 (20:12 +0000)
committerColin LeMahieu <colinl@codeaurora.org>
Sat, 6 Jun 2015 20:12:40 +0000 (20:12 +0000)
commit2ca8f0f5d6b258c53bcf781124e01d264cd8ff1a
tree97f76a6046226868439fa93b2a83415b1e23598f
parent68081f41fafc13e194dfa639a3219b21c176489f
[MC] Common symbols weren't being checked for redeclaration which allowed an assembly file to generate an assertion in setCommon(): !isCommon().  This change allows redeclaration as long as the size and alignment match exactly, otherwise report a fatal error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239227 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCSymbol.h
lib/MC/MCELFStreamer.cpp
test/MC/ELF/common-error3.s [new file with mode: 0644]
test/MC/ELF/common-redeclare.s [new file with mode: 0644]