mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
ae8d4fe15f
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. <rdar://problem/36034922> Differential Revision: https://reviews.llvm.org/D41743 llvm-svn: 321844
6 lines
220 B
LLVM
6 lines
220 B
LLVM
; RUN: not opt -S < %s 2>&1 | FileCheck %s
|
|
|
|
!named = !{!0}
|
|
!0 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", size: 1, flags: DIFlagTypePassByReference | DIFlagTypePassByValue)
|
|
; CHECK: invalid reference flags
|