make sure that we don't use a common symbol if a section was specified

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2006-12-07 18:33:58 +00:00
parent e77242c3d5
commit 7367d05cb7
2 changed files with 5 additions and 0 deletions

View File

@ -296,6 +296,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
unsigned Align = TD->getTypeAlignment(C->getType());
if (C->isNullValue() &&
!I->hasSection() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
I->hasWeakLinkage())) {
SwitchToDataSection(".data", I);

View File

@ -0,0 +1,4 @@
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "__DTOR_END__:"
%__DTOR_END__ = internal global [1 x int] zeroinitializer, section ".dtors"