[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)
commit1c8c213529e08e82c26548199f13bfebe42900af
treee594a82d162b9f418fd663e79e1408facbfef098
parent253fd159779114fa2bcb9deb814b4db29fa12d0a
[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.

llvm-svn: 239227
llvm/include/llvm/MC/MCSymbol.h
llvm/lib/MC/MCELFStreamer.cpp
llvm/test/MC/ELF/common-error3.s [new file with mode: 0644]
llvm/test/MC/ELF/common-redeclare.s [new file with mode: 0644]