summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
authorVictor Leschuk <vleschuk@accesssoftek.com>2016-10-20 00:13:12 +0000
committerVictor Leschuk <vleschuk@accesssoftek.com>2016-10-20 00:13:12 +0000
commit2ede126b1b3fae52cddece5cf1f75b474a9c7932 (patch)
tree0733b4b810dc87c85fda4f44bfa3e74b59cc1e2f /llvm/lib/IR/AsmWriter.cpp
parent7edf93bc5b2bbed4ff9b34ac5126eb210fbbff3c (diff)
downloadbcm5719-llvm-2ede126b1b3fae52cddece5cf1f75b474a9c7932.tar.gz
bcm5719-llvm-2ede126b1b3fae52cddece5cf1f75b474a9c7932.zip
DebugInfo: preparation to implement DW_AT_alignment
- Add alignment attribute to DIVariable family - Modify bitcode format to match new DIVariable representation - Update tests to match these changes (also add bitcode upgrade test) - Expect that frontend passes non-zero align value only when it is not default (was forcibly aligned by alignas()/_Alignas()/__atribute__(aligned()) Differential Revision: https://reviews.llvm.org/D25073 llvm-svn: 284678
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 5500e9638b2..ea00baf3d97 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1822,6 +1822,7 @@ static void writeDIGlobalVariable(raw_ostream &Out, const DIGlobalVariable *N,
Printer.printBool("isDefinition", N->isDefinition());
Printer.printMetadata("expr", N->getExpr());
Printer.printMetadata("declaration", N->getRawStaticDataMemberDeclaration());
+ Printer.printInt("align", N->getAlignInBits());
Out << ")";
}
@@ -1837,6 +1838,7 @@ static void writeDILocalVariable(raw_ostream &Out, const DILocalVariable *N,
Printer.printInt("line", N->getLine());
Printer.printMetadata("type", N->getRawType());
Printer.printDIFlags("flags", N->getFlags());
+ Printer.printInt("align", N->getAlignInBits());
Out << ")";
}
OpenPOWER on IntegriCloud