From f1e3988aa6016188c376b9bcca1afc7559f9fbc0 Mon Sep 17 00:00:00 2001 From: Sourabh Singh Tomar Date: Tue, 3 Dec 2019 09:29:54 +0530 Subject: Recommit "[DWARF5]Addition of alignment atrribute in typedef DIE." This revision is revised to update Go-bindings and Release Notes. The original commit message follows. This patch, adds support for DW_AT_alignment[DWARF5] attribute, to be emitted with typdef DIE. When explicit alignment is specified. Patch by Awanish Pandey Reviewers: aprantl, dblaikie, jini.susan.george, SouraVX, alok, deadalinx Differential Revision: https://reviews.llvm.org/D70111 --- llvm/lib/IR/DIBuilder.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/IR/DIBuilder.cpp') diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index 59b4a5ef8a1..bdd9f6baf37 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -306,10 +306,11 @@ DIDerivedType *DIBuilder::createReferenceType( DIDerivedType *DIBuilder::createTypedef(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo, - DIScope *Context) { + DIScope *Context, + uint32_t AlignInBits) { return DIDerivedType::get(VMContext, dwarf::DW_TAG_typedef, Name, File, - LineNo, getNonCompileUnitScope(Context), Ty, 0, 0, - 0, None, DINode::FlagZero); + LineNo, getNonCompileUnitScope(Context), Ty, 0, + AlignInBits, 0, None, DINode::FlagZero); } DIDerivedType *DIBuilder::createFriend(DIType *Ty, DIType *FriendTy) { -- cgit v1.2.3