[PATCH] D14275: Make createReferenceType take size and align
Keno Fischer via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 19:18:49 PST 2015
loladiro created this revision.
loladiro added reviewers: aprantl, dexonsmith.
loladiro added a subscriber: llvm-commits.
loladiro set the repository for this revision to rL LLVM.
Since we're passing references to dbg.value as pointers, we need to have the frontend properly declare their sizes and alignments (as it already does for regular pointers) in preparation for my upcoming patch to have the verifer check that the sizes agree.
Repository:
rL LLVM
http://reviews.llvm.org/D14275
Files:
include/llvm/IR/DIBuilder.h
lib/IR/DIBuilder.cpp
Index: lib/IR/DIBuilder.cpp
===================================================================
--- lib/IR/DIBuilder.cpp
+++ lib/IR/DIBuilder.cpp
@@ -255,10 +255,12 @@
DITypeRef::get(Base));
}
-DIDerivedType *DIBuilder::createReferenceType(unsigned Tag, DIType *RTy) {
+DIDerivedType *DIBuilder::createReferenceType(unsigned Tag, DIType *RTy,
+ uint64_t SizeInBits,
+ uint64_t AlignInBits) {
assert(RTy && "Unable to create reference type");
return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr,
- DITypeRef::get(RTy), 0, 0, 0, 0);
+ DITypeRef::get(RTy), SizeInBits, AlignInBits, 0, 0);
}
DIDerivedType *DIBuilder::createTypedef(DIType *Ty, StringRef Name,
Index: include/llvm/IR/DIBuilder.h
===================================================================
--- include/llvm/IR/DIBuilder.h
+++ include/llvm/IR/DIBuilder.h
@@ -158,7 +158,9 @@
/// Create debugging information entry for a c++
/// style reference or rvalue reference type.
- DIDerivedType *createReferenceType(unsigned Tag, DIType *RTy);
+ DIDerivedType *createReferenceType(unsigned Tag, DIType *RTy,
+ uint64_t SizeInBits = 0,
+ uint64_t AlignInBits = 0);
/// Create debugging information entry for a typedef.
/// \param Ty Original type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14275.39026.patch
Type: text/x-patch
Size: 1521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151103/b674809b/attachment.bin>
More information about the llvm-commits
mailing list