From ef039a3ccdcd39c558c1d1a360b59bbb9bb11af5 Mon Sep 17 00:00:00 2001 From: Xing Xue Date: Sun, 25 Aug 2019 15:17:25 +0000 Subject: [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 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') 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(GV)) NumBits = DL.getPreferredAlignmentLog(GVar); -- cgit v1.2.3