summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>2019-12-03 09:29:54 +0530
committerSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>2019-12-03 09:51:43 +0530
commitf1e3988aa6016188c376b9bcca1afc7559f9fbc0 (patch)
treed43635bf7de1a036b7663bfbf7639817defe9200 /llvm/lib/IR
parent3f3d0f4f4be04f2dae219c0fe76562eb01ba06d2 (diff)
downloadbcm5719-llvm-f1e3988aa6016188c376b9bcca1afc7559f9fbc0.tar.gz
bcm5719-llvm-f1e3988aa6016188c376b9bcca1afc7559f9fbc0.zip
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 <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')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp7
-rw-r--r--llvm/lib/IR/DebugInfo.cpp7
2 files changed, 7 insertions, 7 deletions
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) {
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 1bbe6b85d26..62bfeb5c5d7 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1108,11 +1108,10 @@ LLVMMetadataRef
LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef Builder, LLVMMetadataRef Type,
const char *Name, size_t NameLen,
LLVMMetadataRef File, unsigned LineNo,
- LLVMMetadataRef Scope) {
+ LLVMMetadataRef Scope, uint32_t AlignInBits) {
return wrap(unwrap(Builder)->createTypedef(
- unwrapDI<DIType>(Type), {Name, NameLen},
- unwrapDI<DIFile>(File), LineNo,
- unwrapDI<DIScope>(Scope)));
+ unwrapDI<DIType>(Type), {Name, NameLen}, unwrapDI<DIFile>(File), LineNo,
+ unwrapDI<DIScope>(Scope), AlignInBits));
}
LLVMMetadataRef
OpenPOWER on IntegriCloud