summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-08-13 01:23:53 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-08-13 01:23:53 +0000
commit3d96acb7351c3bb56d25889601a0f160fdfe9482 (patch)
tree67b04576a3c7a33aeba90f8e18026d06999cbbef /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentd29614f98db4a31bcb1a76b0bad691a016cc035f (diff)
downloadbcm5719-llvm-3d96acb7351c3bb56d25889601a0f160fdfe9482.tar.gz
bcm5719-llvm-3d96acb7351c3bb56d25889601a0f160fdfe9482.zip
[-cxx-abi microsoft] Stick zero initialized symbols into the .bss section for COFF
Summary: We need to do two things: - Initialize BSSSection in MCObjectFileInfo::InitCOFFMCObjectFileInfo - Teach TargetLoweringObjectFileCOFF::SelectSectionForGlobal what to do with it This fixes PR16861. Reviewers: rnk Reviewed By: rnk CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1361 llvm-svn: 188244
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index ea0d62e6ef3..085e8f40186 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -771,15 +771,18 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
}
if (Kind.isText())
- return getTextSection();
+ return TextSection;
if (Kind.isThreadLocal())
- return getTLSDataSection();
+ return TLSDataSection;
- if (Kind.isReadOnly() && ReadOnlySection != 0)
+ if (Kind.isReadOnly())
return ReadOnlySection;
- return getDataSection();
+ if (Kind.isBSS())
+ return BSSSection;
+
+ return DataSection;
}
void TargetLoweringObjectFileCOFF::
OpenPOWER on IntegriCloud