summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorXing Xue <xingxue@outlook.com>2019-08-25 15:17:25 +0000
committerXing Xue <xingxue@outlook.com>2019-08-25 15:17:25 +0000
commitef039a3ccdcd39c558c1d1a360b59bbb9bb11af5 (patch)
treef2823223d2dc5604a4852e70219df5402ff2729e /llvm/lib/CodeGen/AsmPrinter
parent76f005535addf2ac4817c4f3a1c50330c44a6b57 (diff)
downloadbcm5719-llvm-ef039a3ccdcd39c558c1d1a360b59bbb9bb11af5.tar.gz
bcm5719-llvm-ef039a3ccdcd39c558c1d1a360b59bbb9bb11af5.zip
[PowerPC][AIX] Adds support for writing the .data section in assembly files
Summary: Adds support for generating the .data section in assembly files for global variables with a non-zero initialization. The support for writing the .data section in XCOFF object files will be added in a follow-on patch. Any relocations are not included in this patch. Reviewers: hubert.reinterpretcast, sfertile, jasonliu, daltenty, Xiangling_L Reviewed by: hubert.reinterpretcast Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, wuzish, shchenz, DiggerLin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66154 llvm-svn: 369869
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 8530174bb6c..220c4758956 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -162,8 +162,9 @@ static gcp_map_type &getGCMap(void *&P) {
/// getGVAlignmentLog2 - Return the alignment to use for the specified global
/// value in log2 form. This rounds up to the preferred alignment if possible
/// and legal.
-static unsigned getGVAlignmentLog2(const GlobalValue *GV, const DataLayout &DL,
- unsigned InBits = 0) {
+unsigned AsmPrinter::getGVAlignmentLog2(const GlobalValue *GV,
+ const DataLayout &DL,
+ unsigned InBits) {
unsigned NumBits = 0;
if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
NumBits = DL.getPreferredAlignmentLog(GVar);
OpenPOWER on IntegriCloud