From a29aac7b774d1fec7033f6d0fdfaf919e97e8492 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 5 Jan 2018 01:13:37 +0000 Subject: Debug Info: Support DW_AT_calling_convention on composite types. This implements the DWARF 5 feature described at http://www.dwarfstd.org/ShowIssue.php?issue=141215.1 This allows a consumer to understand whether a composite data type is trivially copyable and thus should be passed by value instead of by reference. The canonical example is being able to distinguish the following two types: // S is not trivially copyable because of the explicit destructor. struct S { ~S() {} }; // T is a POD type. struct T { ~T() = default; }; This patch adds two new (DI)flags to LLVM metadata: TypePassByValue and TypePassByReference. Differential Revision: https://reviews.llvm.org/D41743 llvm-svn: 321844 --- llvm/include/llvm-c/DebugInfo.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/include/llvm-c') diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h index d17c690be4d..a5e5653630c 100644 --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -52,6 +52,8 @@ typedef enum { LLVMDIFlagBitField = 1 << 19, LLVMDIFlagNoReturn = 1 << 20, LLVMDIFlagMainSubprogram = 1 << 21, + LLVMDIFlagTypePassByValue = 1 << 22, + LLVMDIFlagTypePassByReference = 1 << 23, LLVMDIFlagIndirectVirtualBase = (1 << 2) | (1 << 5), LLVMDIFlagAccessibility = LLVMDIFlagPrivate | LLVMDIFlagProtected | LLVMDIFlagPublic, -- cgit v1.2.3