summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>2019-11-16 02:14:34 +0530
committerSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>2019-11-16 21:56:53 +0530
commit423f541c1a322963cf482683fe9777ef0692082d (patch)
treef1ca1b5a2a0d5c5d862e39d375855190dc14bb83 /llvm/lib/IR/DIBuilder.cpp
parenta7f97b02b4fa8b4b1824a7c9b14deb798f55e76a (diff)
downloadbcm5719-llvm-423f541c1a322963cf482683fe9777ef0692082d.tar.gz
bcm5719-llvm-423f541c1a322963cf482683fe9777ef0692082d.zip
[DWARF5]Addition of alignment atrribute in typedef DIE.
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 <Awanish.Pandey@amd.com> Reviewers: aprantl, dblaikie, jini.susan.george, SouraVX, alok, deadalinx Differential Revision: https://reviews.llvm.org/D70111
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 59b4a5ef8a1..3280106cf9f 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -306,9 +306,11 @@ DIDerivedType *DIBuilder::createReferenceType(
DIDerivedType *DIBuilder::createTypedef(DIType *Ty, StringRef Name,
DIFile *File, unsigned LineNo,
- DIScope *Context) {
+ DIScope *Context,
+ Optional<unsigned> AlignInBits) {
return DIDerivedType::get(VMContext, dwarf::DW_TAG_typedef, Name, File,
- LineNo, getNonCompileUnitScope(Context), Ty, 0, 0,
+ LineNo, getNonCompileUnitScope(Context), Ty, 0,
+ AlignInBits.hasValue() ? AlignInBits.getValue() : 0,
0, None, DINode::FlagZero);
}
OpenPOWER on IntegriCloud