<div dir="ltr">Ping, was there an answer to these questions? (I think it did get reverted? But it'd be good to have breadcrumbs here to mention which revision reverted it & answer Adrian's question)</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 26, 2016 at 9:30 AM Adrian Prantl via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, I'm confused: I thought we decided against introducing a DIAlignment typedef?<br class="gmail_msg">
<br class="gmail_msg">
-- adrian<br class="gmail_msg">
> On Oct 26, 2016, at 1:55 AM, Victor Leschuk via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> Author: vleschuk<br class="gmail_msg">
> Date: Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> New Revision: 285181<br class="gmail_msg">
><br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=285181&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=285181&view=rev</a><br class="gmail_msg">
> Log:<br class="gmail_msg">
> DebugInfo: support for DWARFv5 DW_AT_alignment attribute<br class="gmail_msg">
><br class="gmail_msg">
> * Assume that clang passes non-zero alignment value to DIBuilder<br class="gmail_msg">
> only in case when it was forced by C++11 'alignas', C11 '_Alignas'<br class="gmail_msg">
> or compiler attribute '__attribute__((aligned (N)))'.<br class="gmail_msg">
><br class="gmail_msg">
> * Emit DW_AT_alignment if alignment is specified for type/object.<br class="gmail_msg">
><br class="gmail_msg">
> Differential Revision: <a href="https://reviews.llvm.org/D24425" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D24425</a><br class="gmail_msg">
><br class="gmail_msg">
> Added:<br class="gmail_msg">
> llvm/trunk/test/DebugInfo/X86/align_c11.ll<br class="gmail_msg">
> llvm/trunk/test/DebugInfo/X86/align_cpp11.ll<br class="gmail_msg">
> llvm/trunk/test/DebugInfo/X86/align_objc.ll<br class="gmail_msg">
> Modified:<br class="gmail_msg">
> llvm/trunk/docs/SourceLevelDebugging.rst<br class="gmail_msg">
> llvm/trunk/include/llvm/IR/DebugInfoMetadata.h<br class="gmail_msg">
> llvm/trunk/include/llvm/Support/Dwarf.h<br class="gmail_msg">
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br class="gmail_msg">
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="gmail_msg">
> llvm/trunk/lib/Support/Dwarf.cpp<br class="gmail_msg">
> llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll<br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/docs/SourceLevelDebugging.rst<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/SourceLevelDebugging.rst?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/SourceLevelDebugging.rst?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/docs/SourceLevelDebugging.rst (original)<br class="gmail_msg">
> +++ llvm/trunk/docs/SourceLevelDebugging.rst Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -386,7 +386,7 @@ Given an integer global variable declare<br class="gmail_msg">
><br class="gmail_msg">
> .. code-block:: c<br class="gmail_msg">
><br class="gmail_msg">
> - int MyGlobal = 100;<br class="gmail_msg">
> + _Alignas(8) int MyGlobal = 100;<br class="gmail_msg">
><br class="gmail_msg">
> a C/C++ front-end would generate the following descriptors:<br class="gmail_msg">
><br class="gmail_msg">
> @@ -395,54 +395,59 @@ a C/C++ front-end would generate the fol<br class="gmail_msg">
> ;;<br class="gmail_msg">
> ;; Define the global itself.<br class="gmail_msg">
> ;;<br class="gmail_msg">
> - @MyGlobal = global i32 100, align 4<br class="gmail_msg">
> + @MyGlobal = global i32 100, align 8, !dbg !0<br class="gmail_msg">
><br class="gmail_msg">
> ;;<br class="gmail_msg">
> ;; List of debug info of globals<br class="gmail_msg">
> ;;<br class="gmail_msg">
> - !<a href="http://llvm.dbg.cu" rel="noreferrer" class="gmail_msg" target="_blank">llvm.dbg.cu</a> = !{!0}<br class="gmail_msg">
> + !<a href="http://llvm.dbg.cu" rel="noreferrer" class="gmail_msg" target="_blank">llvm.dbg.cu</a> = !{!1}<br class="gmail_msg">
><br class="gmail_msg">
> ;; Some unrelated metadata.<br class="gmail_msg">
> !llvm.module.flags = !{!6, !7}<br class="gmail_msg">
> + !llvm.ident = !{!8}<br class="gmail_msg">
> +<br class="gmail_msg">
> + ;; Define the global variable itself<br class="gmail_msg">
> + !0 = distinct !DIGlobalVariable(name: "MyGlobal", scope: !1, file: !2, line: 1, type: !5, isLocal: false, isDefinition: true, align: 64)<br class="gmail_msg">
><br class="gmail_msg">
> ;; Define the compile unit.<br class="gmail_msg">
> - !0 = !DICompileUnit(language: DW_LANG_C99, file: !1,<br class="gmail_msg">
> - producer:<br class="gmail_msg">
> - "clang version 3.7.0 (trunk 231150) (llvm/trunk 231154)",<br class="gmail_msg">
> - isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug,<br class="gmail_msg">
> - enums: !2, retainedTypes: !2, subprograms: !2, globals:<br class="gmail_msg">
> - !3, imports: !2)<br class="gmail_msg">
> + !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2,<br class="gmail_msg">
> + producer: "clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> ae4deadbea242e8ea517eef662c30443f75bd086) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 818b4c1539df3e51dc7e62c89ead4abfd348827d)",<br class="gmail_msg">
> + isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug,<br class="gmail_msg">
> + enums: !3, globals: !4)<br class="gmail_msg">
><br class="gmail_msg">
> ;;<br class="gmail_msg">
> ;; Define the file<br class="gmail_msg">
> ;;<br class="gmail_msg">
> - !1 = !DIFile(filename: "/dev/stdin",<br class="gmail_msg">
> + !2 = !DIFile(filename: "/dev/stdin",<br class="gmail_msg">
> directory: "/Users/dexonsmith/data/llvm/debug-info")<br class="gmail_msg">
><br class="gmail_msg">
> ;; An empty array.<br class="gmail_msg">
> - !2 = !{}<br class="gmail_msg">
> + !3 = !{}<br class="gmail_msg">
><br class="gmail_msg">
> ;; The Array of Global Variables<br class="gmail_msg">
> - !3 = !{!4}<br class="gmail_msg">
> -<br class="gmail_msg">
> - ;;<br class="gmail_msg">
> - ;; Define the global variable itself.<br class="gmail_msg">
> - ;;<br class="gmail_msg">
> - !4 = !DIGlobalVariable(name: "MyGlobal", scope: !0, file: !1, line: 1,<br class="gmail_msg">
> - type: !5, isLocal: false, isDefinition: true,<br class="gmail_msg">
> - variable: i32* @MyGlobal)<br class="gmail_msg">
> + !4 = !{!0}<br class="gmail_msg">
><br class="gmail_msg">
> ;;<br class="gmail_msg">
> ;; Define the type<br class="gmail_msg">
> ;;<br class="gmail_msg">
> - !5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
> + !5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
><br class="gmail_msg">
> ;; Dwarf version to output.<br class="gmail_msg">
> - !6 = !{i32 2, !"Dwarf Version", i32 2}<br class="gmail_msg">
> + !6 = !{i32 2, !"Dwarf Version", i32 4}<br class="gmail_msg">
><br class="gmail_msg">
> ;; Debug info schema version.<br class="gmail_msg">
> !7 = !{i32 2, !"Debug Info Version", i32 3}<br class="gmail_msg">
><br class="gmail_msg">
> + ;; Compiler identification<br class="gmail_msg">
> + !8 = !{!"clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> ae4deadbea242e8ea517eef662c30443f75bd086) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 818b4c1539df3e51dc7e62c89ead4abfd348827d)"}<br class="gmail_msg">
> +<br class="gmail_msg">
> +<br class="gmail_msg">
> +The align value in DIGlobalVariable description specifies variable alignment in<br class="gmail_msg">
> +case it was forced by C11 _Alignas(), C++11 alignas() keywords or compiler<br class="gmail_msg">
> +attribute __attribute__((aligned ())). In other case (when this field is missing)<br class="gmail_msg">
> +alignment is considered default. This is used when producing DWARF output<br class="gmail_msg">
> +for DW_AT_alignment value.<br class="gmail_msg">
> +<br class="gmail_msg">
> C/C++ function information<br class="gmail_msg">
> --------------------------<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)<br class="gmail_msg">
> +++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -1842,8 +1842,8 @@ public:<br class="gmail_msg">
> StringRef getName() const { return getStringOperand(1); }<br class="gmail_msg">
> DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); }<br class="gmail_msg">
> DITypeRef getType() const { return DITypeRef(getRawType()); }<br class="gmail_msg">
> - uint64_t getAlignInBits() const { return AlignInBits; }<br class="gmail_msg">
> - uint64_t getAlignInBytes() const { return getAlignInBits() / CHAR_BIT; }<br class="gmail_msg">
> + DIAlignment getAlignInBits() const { return AlignInBits; }<br class="gmail_msg">
> + DIAlignment getAlignInBytes() const { return getAlignInBits() / CHAR_BIT; }<br class="gmail_msg">
><br class="gmail_msg">
> StringRef getFilename() const {<br class="gmail_msg">
> if (auto *F = getFile())<br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/include/llvm/Support/Dwarf.h<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/include/llvm/Support/Dwarf.h (original)<br class="gmail_msg">
> +++ llvm/trunk/include/llvm/Support/Dwarf.h Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -198,6 +198,7 @@ enum Attribute : uint16_t {<br class="gmail_msg">
> DW_AT_rvalue_reference = 0x78,<br class="gmail_msg">
> DW_AT_macros = 0x79,<br class="gmail_msg">
> DW_AT_noreturn = 0x87,<br class="gmail_msg">
> + DW_AT_alignment = 0x88,<br class="gmail_msg">
><br class="gmail_msg">
> DW_AT_lo_user = 0x2000,<br class="gmail_msg">
> DW_AT_hi_user = 0x3fff,<br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)<br class="gmail_msg">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -118,6 +118,10 @@ DIE *DwarfCompileUnit::getOrCreateGlobal<br class="gmail_msg">
> else<br class="gmail_msg">
> addGlobalName(GV->getName(), *VariableDIE, DeclContext);<br class="gmail_msg">
><br class="gmail_msg">
> + if (DIAlignment AlignInBytes = GV->getAlignInBytes())<br class="gmail_msg">
> + addUInt(*VariableDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,<br class="gmail_msg">
> + AlignInBytes);<br class="gmail_msg">
> +<br class="gmail_msg">
> // Add location.<br class="gmail_msg">
> bool addToAccelTable = false;<br class="gmail_msg">
><br class="gmail_msg">
> @@ -771,7 +775,13 @@ void DwarfCompileUnit::applyVariableAttr<br class="gmail_msg">
> StringRef Name = Var.getName();<br class="gmail_msg">
> if (!Name.empty())<br class="gmail_msg">
> addString(VariableDie, dwarf::DW_AT_name, Name);<br class="gmail_msg">
> - addSourceLine(VariableDie, Var.getVariable());<br class="gmail_msg">
> + const auto *DIVar = Var.getVariable();<br class="gmail_msg">
> + if (DIVar)<br class="gmail_msg">
> + if (DIAlignment AlignInBytes = DIVar->getAlignInBytes())<br class="gmail_msg">
> + addUInt(VariableDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,<br class="gmail_msg">
> + AlignInBytes);<br class="gmail_msg">
> +<br class="gmail_msg">
> + addSourceLine(VariableDie, DIVar);<br class="gmail_msg">
> addType(VariableDie, Var.getType());<br class="gmail_msg">
> if (Var.isArtificial())<br class="gmail_msg">
> addFlag(VariableDie, dwarf::DW_AT_artificial);<br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)<br class="gmail_msg">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -1007,6 +1007,11 @@ void DwarfUnit::constructTypeDIE(DIE &Bu<br class="gmail_msg">
> if (RLang)<br class="gmail_msg">
> addUInt(Buffer, dwarf::DW_AT_APPLE_runtime_class, dwarf::DW_FORM_data1,<br class="gmail_msg">
> RLang);<br class="gmail_msg">
> +<br class="gmail_msg">
> + // Add align info if available.<br class="gmail_msg">
> + if (uint64_t AlignInBytes = CTy->getAlignInBytes())<br class="gmail_msg">
> + addUInt(Buffer, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,<br class="gmail_msg">
> + AlignInBytes);<br class="gmail_msg">
> }<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
> @@ -1394,6 +1399,7 @@ void DwarfUnit::constructMemberDIE(DIE &<br class="gmail_msg">
> } else {<br class="gmail_msg">
> uint64_t Size = DT->getSizeInBits();<br class="gmail_msg">
> uint64_t FieldSize = DD->getBaseTypeSize(DT);<br class="gmail_msg">
> + uint64_t AlignInBytes = DT->getAlignInBytes();<br class="gmail_msg">
> uint64_t OffsetInBytes;<br class="gmail_msg">
><br class="gmail_msg">
> bool IsBitfield = FieldSize && Size != FieldSize;<br class="gmail_msg">
> @@ -1431,6 +1437,9 @@ void DwarfUnit::constructMemberDIE(DIE &<br class="gmail_msg">
> } else {<br class="gmail_msg">
> // This is not a bitfield.<br class="gmail_msg">
> OffsetInBytes = DT->getOffsetInBits() / 8;<br class="gmail_msg">
> + if (AlignInBytes)<br class="gmail_msg">
> + addUInt(MemberDie, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,<br class="gmail_msg">
> + AlignInBytes);<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
> if (DD->getDwarfVersion() <= 2) {<br class="gmail_msg">
> @@ -1507,6 +1516,10 @@ DIE *DwarfUnit::getOrCreateStaticMemberD<br class="gmail_msg">
> if (const ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(DT->getConstant()))<br class="gmail_msg">
> addConstantFPValue(StaticMemberDIE, CFP);<br class="gmail_msg">
><br class="gmail_msg">
> + if (uint64_t AlignInBytes = DT->getAlignInBytes())<br class="gmail_msg">
> + addUInt(StaticMemberDIE, dwarf::DW_AT_alignment, dwarf::DW_FORM_udata,<br class="gmail_msg">
> + AlignInBytes);<br class="gmail_msg">
> +<br class="gmail_msg">
> return &StaticMemberDIE;<br class="gmail_msg">
> }<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/lib/Support/Dwarf.cpp<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Dwarf.cpp?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Dwarf.cpp?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/lib/Support/Dwarf.cpp (original)<br class="gmail_msg">
> +++ llvm/trunk/lib/Support/Dwarf.cpp Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -149,6 +149,8 @@ StringRef llvm::dwarf::AttributeString(u<br class="gmail_msg">
> case DW_AT_reference: return "DW_AT_reference";<br class="gmail_msg">
> case DW_AT_rvalue_reference: return "DW_AT_rvalue_reference";<br class="gmail_msg">
> case DW_AT_noreturn: return "DW_AT_noreturn";<br class="gmail_msg">
> + case DW_AT_alignment:<br class="gmail_msg">
> + return "DW_AT_alignment";<br class="gmail_msg">
> case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";<br class="gmail_msg">
> case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";<br class="gmail_msg">
> case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";<br class="gmail_msg">
><br class="gmail_msg">
> Added: llvm/trunk/test/DebugInfo/X86/align_c11.ll<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/align_c11.ll?rev=285181&view=auto" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/align_c11.ll?rev=285181&view=auto</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/test/DebugInfo/X86/align_c11.ll (added)<br class="gmail_msg">
> +++ llvm/trunk/test/DebugInfo/X86/align_c11.ll Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -0,0 +1,83 @@<br class="gmail_msg">
> +; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s<br class="gmail_msg">
> +; REQUIRES: object-emission<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Generated by clang -c -g -std=c11 -S -emit-llvm from the following C11 source<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; // every object of type struct data will be aligned to 128-byte boundary<br class="gmail_msg">
> +; struct data {<br class="gmail_msg">
> +; char x;<br class="gmail_msg">
> +; _Alignas(128) char arr[2];<br class="gmail_msg">
> +; };<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; _Alignas(2048) struct data d; // this instance of data is aligned even stricter<br class="gmail_msg">
> +; int foo(void)<br class="gmail_msg">
> +; {<br class="gmail_msg">
> +; struct data local_data;<br class="gmail_msg">
> +; return 0;<br class="gmail_msg">
> +; }<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_variable<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"d"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}2048<br class="gmail_msg">
> +; CHECK: DW_TAG_structure_type<br class="gmail_msg">
> +; CHECK: DW_TAG_member<br class="gmail_msg">
> +; CHECK: DW_TAG_member<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"arr"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}128<br class="gmail_msg">
> +<br class="gmail_msg">
> +; ModuleID = 'test.c'<br class="gmail_msg">
> +source_filename = "test.c"<br class="gmail_msg">
> +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"<br class="gmail_msg">
> +target triple = "x86_64-unknown-linux-gnu"<br class="gmail_msg">
> +<br class="gmail_msg">
> +%struct.data = type { i8, [127 x i8], [2 x i8], [126 x i8] }<br class="gmail_msg">
> +<br class="gmail_msg">
> +@d = common global %struct.data zeroinitializer, align 2048, !dbg !0<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Function Attrs: nounwind uwtable<br class="gmail_msg">
> +define i32 @foo() #0 !dbg !17 {<br class="gmail_msg">
> +entry:<br class="gmail_msg">
> + %local_data = alloca %struct.data, align 128<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata %struct.data* %local_data, metadata !21, metadata !22), !dbg !23<br class="gmail_msg">
> + ret i32 0, !dbg !24<br class="gmail_msg">
> +}<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Function Attrs: nounwind readnone<br class="gmail_msg">
> +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1<br class="gmail_msg">
> +<br class="gmail_msg">
> +attributes #0 = { nounwind uwtable }<br class="gmail_msg">
> +attributes #1 = { nounwind readnone }<br class="gmail_msg">
> +<br class="gmail_msg">
> +!<a href="http://llvm.dbg.cu" rel="noreferrer" class="gmail_msg" target="_blank">llvm.dbg.cu</a> = !{!1}<br class="gmail_msg">
> +!llvm.module.flags = !{!14, !15}<br class="gmail_msg">
> +!llvm.ident = !{!16}<br class="gmail_msg">
> +<br class="gmail_msg">
> +!0 = distinct !DIGlobalVariable(name: "d", scope: !1, file: !5, line: 7, type: !6, isLocal: false, isDefinition: true, align: 16384)<br class="gmail_msg">
> +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> 9ce5220b821054019059c2ac4a9b132c7723832d) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)<br class="gmail_msg">
> +!2 = !DIFile(filename: "test.c", directory: "/tmp")<br class="gmail_msg">
> +!3 = !{}<br class="gmail_msg">
> +!4 = !{!0}<br class="gmail_msg">
> +!5 = !DIFile(filename: "test.c", directory: "/tmp")<br class="gmail_msg">
> +!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "data", file: !5, line: 2, size: 2048, elements: !7)<br class="gmail_msg">
> +!7 = !{!8, !10}<br class="gmail_msg">
> +!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !6, file: !5, line: 3, baseType: !9, size: 8)<br class="gmail_msg">
> +!9 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)<br class="gmail_msg">
> +!10 = !DIDerivedType(tag: DW_TAG_member, name: "arr", scope: !6, file: !5, line: 4, baseType: !11, size: 16, align: 1024, offset: 1024)<br class="gmail_msg">
> +!11 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 16, elements: !12)<br class="gmail_msg">
> +!12 = !{!13}<br class="gmail_msg">
> +!13 = !DISubrange(count: 2)<br class="gmail_msg">
> +!14 = !{i32 2, !"Dwarf Version", i32 4}<br class="gmail_msg">
> +!15 = !{i32 2, !"Debug Info Version", i32 3}<br class="gmail_msg">
> +!16 = !{!"clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> 9ce5220b821054019059c2ac4a9b132c7723832d) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 9a6298be89ce0359b151c0a37af2776a12c69e85)"}<br class="gmail_msg">
> +!17 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 8, type: !18, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !1, variables: !3)<br class="gmail_msg">
> +!18 = !DISubroutineType(types: !19)<br class="gmail_msg">
> +!19 = !{!20}<br class="gmail_msg">
> +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
> +!21 = !DILocalVariable(name: "local_data", scope: !17, file: !5, line: 10, type: !6)<br class="gmail_msg">
> +!22 = !DIExpression()<br class="gmail_msg">
> +!23 = !DILocation(line: 10, column: 17, scope: !17)<br class="gmail_msg">
> +!24 = !DILocation(line: 11, column: 5, scope: !17)<br class="gmail_msg">
><br class="gmail_msg">
> Added: llvm/trunk/test/DebugInfo/X86/align_cpp11.ll<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/align_cpp11.ll?rev=285181&view=auto" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/align_cpp11.ll?rev=285181&view=auto</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/test/DebugInfo/X86/align_cpp11.ll (added)<br class="gmail_msg">
> +++ llvm/trunk/test/DebugInfo/X86/align_cpp11.ll Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -0,0 +1,172 @@<br class="gmail_msg">
> +; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s<br class="gmail_msg">
> +; REQUIRES: object-emission<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Generated by clang++ -c -g -std=c++11 -S -emit-llvm from the following C++11 source<br class="gmail_msg">
> +; struct S {<br class="gmail_msg">
> +; char x;<br class="gmail_msg">
> +; alignas(128) char xx;<br class="gmail_msg">
> +; };<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; class alignas(64) C0 {<br class="gmail_msg">
> +; };<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; class C1 {<br class="gmail_msg">
> +; alignas(64) static void *p;<br class="gmail_msg">
> +; };<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; enum alignas(16) E {<br class="gmail_msg">
> +; A,<br class="gmail_msg">
> +; B,<br class="gmail_msg">
> +; C,<br class="gmail_msg">
> +; };<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; C0 c0;<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; alignas(2048) S s;<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; void foo()<br class="gmail_msg">
> +; {<br class="gmail_msg">
> +; S ss;<br class="gmail_msg">
> +; E e;<br class="gmail_msg">
> +; C1 c1;<br class="gmail_msg">
> +; alignas(32) int i = 42;<br class="gmail_msg">
> +; auto Lambda = [i](){};<br class="gmail_msg">
> +; }<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_class_type<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"C0"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}64<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_variable<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"s"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}2048<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_structure_type<br class="gmail_msg">
> +; CHECK: DW_TAG_member<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"xx"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}128<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_enumeration_type<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}16<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_variable<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"i"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}32<br class="gmail_msg">
> +; CHECK: DW_TAG_class_type<br class="gmail_msg">
> +; CHECK: DW_TAG_member<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"i"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}32<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_class_type<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"C1"<br class="gmail_msg">
> +; CHECK: DW_TAG_member<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"p"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}64<br class="gmail_msg">
> +<br class="gmail_msg">
> +; ModuleID = 'test.cpp'<br class="gmail_msg">
> +source_filename = "test.cpp"<br class="gmail_msg">
> +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"<br class="gmail_msg">
> +target triple = "x86_64-unknown-linux-gnu"<br class="gmail_msg">
> +<br class="gmail_msg">
> +%class.C0 = type { [64 x i8] }<br class="gmail_msg">
> +%struct.S = type { i8, [127 x i8], i8, [127 x i8] }<br class="gmail_msg">
> +%class.C1 = type { i8 }<br class="gmail_msg">
> +%class.anon = type { i32 }<br class="gmail_msg">
> +<br class="gmail_msg">
> +@c0 = global %class.C0 zeroinitializer, align 64, !dbg !0<br class="gmail_msg">
> +@s = global %struct.S zeroinitializer, align 2048, !dbg !11<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Function Attrs: nounwind uwtable<br class="gmail_msg">
> +define void @_Z3foov() #0 !dbg !22 {<br class="gmail_msg">
> +entry:<br class="gmail_msg">
> + %ss = alloca %struct.S, align 128<br class="gmail_msg">
> + %e = alloca i32, align 16<br class="gmail_msg">
> + %c1 = alloca %class.C1, align 1<br class="gmail_msg">
> + %i = alloca i32, align 32<br class="gmail_msg">
> + %Lambda = alloca %class.anon, align 4<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata %struct.S* %ss, metadata !25, metadata !26), !dbg !27<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata i32* %e, metadata !28, metadata !26), !dbg !29<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata %class.C1* %c1, metadata !30, metadata !26), !dbg !35<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata i32* %i, metadata !36, metadata !26), !dbg !38<br class="gmail_msg">
> + store i32 42, i32* %i, align 32, !dbg !38<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata %class.anon* %Lambda, metadata !39, metadata !26), !dbg !48<br class="gmail_msg">
> + %0 = getelementptr inbounds %class.anon, %class.anon* %Lambda, i32 0, i32 0, !dbg !49<br class="gmail_msg">
> + %1 = load i32, i32* %i, align 32, !dbg !50<br class="gmail_msg">
> + store i32 %1, i32* %0, align 4, !dbg !49<br class="gmail_msg">
> + ret void, !dbg !51<br class="gmail_msg">
> +}<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Function Attrs: nounwind readnone<br class="gmail_msg">
> +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1<br class="gmail_msg">
> +<br class="gmail_msg">
> +attributes #0 = { nounwind uwtable }<br class="gmail_msg">
> +attributes #1 = { nounwind readnone }<br class="gmail_msg">
> +<br class="gmail_msg">
> +!<a href="http://llvm.dbg.cu" rel="noreferrer" class="gmail_msg" target="_blank">llvm.dbg.cu</a> = !{!1}<br class="gmail_msg">
> +!llvm.module.flags = !{!19, !20}<br class="gmail_msg">
> +!llvm.ident = !{!21}<br class="gmail_msg">
> +<br class="gmail_msg">
> +!0 = distinct !DIGlobalVariable(name: "c0", scope: !1, file: !5, line: 19, type: !17, isLocal: false, isDefinition: true)<br class="gmail_msg">
> +!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> 9ce5220b821054019059c2ac4a9b132c7723832d) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !10)<br class="gmail_msg">
> +!2 = !DIFile(filename: "test.cpp", directory: "/tmp")<br class="gmail_msg">
> +!3 = !{!4}<br class="gmail_msg">
> +!4 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", file: !5, line: 13, size: 32, align: 128, elements: !6, identifier: "_ZTS1E")<br class="gmail_msg">
> +!5 = !DIFile(filename: "./test.cpp", directory: "/tmp")<br class="gmail_msg">
> +!6 = !{!7, !8, !9}<br class="gmail_msg">
> +!7 = !DIEnumerator(name: "A", value: 0)<br class="gmail_msg">
> +!8 = !DIEnumerator(name: "B", value: 1)<br class="gmail_msg">
> +!9 = !DIEnumerator(name: "C", value: 2)<br class="gmail_msg">
> +!10 = !{!0, !11}<br class="gmail_msg">
> +!11 = distinct !DIGlobalVariable(name: "s", scope: !1, file: !5, line: 21, type: !12, isLocal: false, isDefinition: true, align: 16384)<br class="gmail_msg">
> +!12 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !5, line: 1, size: 2048, elements: !13, identifier: "_ZTS1S")<br class="gmail_msg">
> +!13 = !{!14, !16}<br class="gmail_msg">
> +!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !12, file: !5, line: 2, baseType: !15, size: 8)<br class="gmail_msg">
> +!15 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)<br class="gmail_msg">
> +!16 = !DIDerivedType(tag: DW_TAG_member, name: "xx", scope: !12, file: !5, line: 3, baseType: !15, size: 8, align: 1024, offset: 1024)<br class="gmail_msg">
> +!17 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C0", file: !5, line: 6, size: 512, align: 512, elements: !18, identifier: "_ZTS2C0")<br class="gmail_msg">
> +!18 = !{}<br class="gmail_msg">
> +!19 = !{i32 2, !"Dwarf Version", i32 4}<br class="gmail_msg">
> +!20 = !{i32 2, !"Debug Info Version", i32 3}<br class="gmail_msg">
> +!21 = !{!"clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> 9ce5220b821054019059c2ac4a9b132c7723832d) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 9a6298be89ce0359b151c0a37af2776a12c69e85)"}<br class="gmail_msg">
> +!22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !5, file: !5, line: 23, type: !23, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !1, variables: !18)<br class="gmail_msg">
> +!23 = !DISubroutineType(types: !24)<br class="gmail_msg">
> +!24 = !{null}<br class="gmail_msg">
> +!25 = !DILocalVariable(name: "ss", scope: !22, file: !5, line: 25, type: !12)<br class="gmail_msg">
> +!26 = !DIExpression()<br class="gmail_msg">
> +!27 = !DILocation(line: 25, column: 7, scope: !22)<br class="gmail_msg">
> +!28 = !DILocalVariable(name: "e", scope: !22, file: !5, line: 26, type: !4)<br class="gmail_msg">
> +!29 = !DILocation(line: 26, column: 7, scope: !22)<br class="gmail_msg">
> +!30 = !DILocalVariable(name: "c1", scope: !22, file: !5, line: 27, type: !31)<br class="gmail_msg">
> +!31 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C1", file: !5, line: 9, size: 8, elements: !32, identifier: "_ZTS2C1")<br class="gmail_msg">
> +!32 = !{!33}<br class="gmail_msg">
> +!33 = !DIDerivedType(tag: DW_TAG_member, name: "p", scope: !31, file: !5, line: 10, baseType: !34, align: 512, flags: DIFlagStaticMember)<br class="gmail_msg">
> +!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)<br class="gmail_msg">
> +!35 = !DILocation(line: 27, column: 8, scope: !22)<br class="gmail_msg">
> +!36 = !DILocalVariable(name: "i", scope: !22, file: !5, line: 28, type: !37, align: 256)<br class="gmail_msg">
> +!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
> +!38 = !DILocation(line: 28, column: 21, scope: !22)<br class="gmail_msg">
> +!39 = !DILocalVariable(name: "Lambda", scope: !22, file: !5, line: 29, type: !40)<br class="gmail_msg">
> +!40 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !22, file: !5, line: 29, size: 32, elements: !41)<br class="gmail_msg">
> +!41 = !{!42, !43}<br class="gmail_msg">
> +!42 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !40, file: !5, line: 29, baseType: !37, size: 32, align: 256)<br class="gmail_msg">
> +!43 = !DISubprogram(name: "operator()", scope: !40, file: !5, line: 29, type: !44, isLocal: false, isDefinition: false, scopeLine: 29, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false)<br class="gmail_msg">
> +!44 = !DISubroutineType(types: !45)<br class="gmail_msg">
> +!45 = !{null, !46}<br class="gmail_msg">
> +!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !47, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)<br class="gmail_msg">
> +!47 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !40)<br class="gmail_msg">
> +!48 = !DILocation(line: 29, column: 10, scope: !22)<br class="gmail_msg">
> +!49 = !DILocation(line: 29, column: 19, scope: !22)<br class="gmail_msg">
> +!50 = !DILocation(line: 29, column: 20, scope: !22)<br class="gmail_msg">
> +!51 = !DILocation(line: 30, column: 1, scope: !22)<br class="gmail_msg">
><br class="gmail_msg">
> Added: llvm/trunk/test/DebugInfo/X86/align_objc.ll<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/align_objc.ll?rev=285181&view=auto" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/align_objc.ll?rev=285181&view=auto</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/test/DebugInfo/X86/align_objc.ll (added)<br class="gmail_msg">
> +++ llvm/trunk/test/DebugInfo/X86/align_objc.ll Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -0,0 +1,98 @@<br class="gmail_msg">
> +; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s<br class="gmail_msg">
> +; REQUIRES: object-emission<br class="gmail_msg">
> +<br class="gmail_msg">
> +; typedef struct __attribute__((aligned (128))) {<br class="gmail_msg">
> +; char c;<br class="gmail_msg">
> +; } S0;<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; typedef struct {<br class="gmail_msg">
> +; __attribute__((aligned (64))) char c;<br class="gmail_msg">
> +; } S1;<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; S0 s0;<br class="gmail_msg">
> +;<br class="gmail_msg">
> +; void f() {<br class="gmail_msg">
> +; S1 s1;<br class="gmail_msg">
> +; __attribute__((aligned (32))) int i;<br class="gmail_msg">
> +; }<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_typedef<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"S0"<br class="gmail_msg">
> +; CHECK: DW_TAG_structure_type<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}128<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_variable<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"i"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}32<br class="gmail_msg">
> +<br class="gmail_msg">
> +; CHECK: DW_TAG_typedef<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"S1"<br class="gmail_msg">
> +; CHECK: DW_TAG_structure_type<br class="gmail_msg">
> +; CHECK: DW_TAG_member<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_name{{.*}}"c"<br class="gmail_msg">
> +; CHECK-NOT: DW_TAG<br class="gmail_msg">
> +; CHECK: DW_AT_alignment{{.*}}64<br class="gmail_msg">
> +<br class="gmail_msg">
> +; ModuleID = 'test.m'<br class="gmail_msg">
> +source_filename = "test.m"<br class="gmail_msg">
> +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"<br class="gmail_msg">
> +target triple = "x86_64-unknown-linux-gnu"<br class="gmail_msg">
> +<br class="gmail_msg">
> +%struct.S0 = type { i8, [127 x i8] }<br class="gmail_msg">
> +%struct.S1 = type { i8, [63 x i8] }<br class="gmail_msg">
> +<br class="gmail_msg">
> +@s0 = common global %struct.S0 zeroinitializer, align 128, !dbg !0<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Function Attrs: nounwind uwtable<br class="gmail_msg">
> +define void @f() #0 !dbg !14 {<br class="gmail_msg">
> +entry:<br class="gmail_msg">
> + %s1 = alloca %struct.S1, align 64<br class="gmail_msg">
> + %i = alloca i32, align 32<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata %struct.S1* %s1, metadata !17, metadata !22), !dbg !23<br class="gmail_msg">
> + call void @llvm.dbg.declare(metadata i32* %i, metadata !24, metadata !22), !dbg !26<br class="gmail_msg">
> + ret void, !dbg !27<br class="gmail_msg">
> +}<br class="gmail_msg">
> +<br class="gmail_msg">
> +; Function Attrs: nounwind readnone<br class="gmail_msg">
> +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1<br class="gmail_msg">
> +<br class="gmail_msg">
> +attributes #0 = { nounwind uwtable }<br class="gmail_msg">
> +attributes #1 = { nounwind readnone }<br class="gmail_msg">
> +<br class="gmail_msg">
> +!<a href="http://llvm.dbg.cu" rel="noreferrer" class="gmail_msg" target="_blank">llvm.dbg.cu</a> = !{!1}<br class="gmail_msg">
> +!llvm.module.flags = !{!11, !12}<br class="gmail_msg">
> +!llvm.ident = !{!13}<br class="gmail_msg">
> +<br class="gmail_msg">
> +!0 = distinct !DIGlobalVariable(name: "s0", scope: !1, file: !5, line: 10, type: !6, isLocal: false, isDefinition: true)<br class="gmail_msg">
> +!1 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !2, producer: "clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> 9ce5220b821054019059c2ac4a9b132c7723832d) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug, enums: !3, globals: !4)<br class="gmail_msg">
> +!2 = !DIFile(filename: "test.m", directory: "/tmp")<br class="gmail_msg">
> +!3 = !{}<br class="gmail_msg">
> +!4 = !{!0}<br class="gmail_msg">
> +!5 = !DIFile(filename: "test.m", directory: "/tmp")<br class="gmail_msg">
> +!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "S0", file: !5, line: 3, baseType: !7)<br class="gmail_msg">
> +!7 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !5, line: 1, size: 1024, align: 1024, elements: !8)<br class="gmail_msg">
> +!8 = !{!9}<br class="gmail_msg">
> +!9 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !7, file: !5, line: 2, baseType: !10, size: 8)<br class="gmail_msg">
> +!10 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)<br class="gmail_msg">
> +!11 = !{i32 2, !"Dwarf Version", i32 4}<br class="gmail_msg">
> +!12 = !{i32 2, !"Debug Info Version", i32 3}<br class="gmail_msg">
> +!13 = !{!"clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/clang.git</a> 9ce5220b821054019059c2ac4a9b132c7723832d) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/git/llvm.git</a> 9a6298be89ce0359b151c0a37af2776a12c69e85)"}<br class="gmail_msg">
> +!14 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 12, type: !15, isLocal: false, isDefinition: true, scopeLine: 12, isOptimized: false, unit: !1, variables: !3)<br class="gmail_msg">
> +!15 = !DISubroutineType(types: !16)<br class="gmail_msg">
> +!16 = !{null}<br class="gmail_msg">
> +!17 = !DILocalVariable(name: "s1", scope: !14, file: !5, line: 13, type: !18)<br class="gmail_msg">
> +!18 = !DIDerivedType(tag: DW_TAG_typedef, name: "S1", file: !5, line: 8, baseType: !19)<br class="gmail_msg">
> +!19 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !5, line: 6, size: 512, elements: !20)<br class="gmail_msg">
> +!20 = !{!21}<br class="gmail_msg">
> +!21 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !19, file: !5, line: 7, baseType: !10, size: 8, align: 512)<br class="gmail_msg">
> +!22 = !DIExpression()<br class="gmail_msg">
> +!23 = !DILocation(line: 13, column: 6, scope: !14)<br class="gmail_msg">
> +!24 = !DILocalVariable(name: "i", scope: !14, file: !5, line: 14, type: !25, align: 256)<br class="gmail_msg">
> +!25 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
> +!26 = !DILocation(line: 14, column: 37, scope: !14)<br class="gmail_msg">
> +!27 = !DILocation(line: 15, column: 1, scope: !14)<br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll?rev=285181&r1=285180&r2=285181&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll?rev=285181&r1=285180&r2=285181&view=diff</a><br class="gmail_msg">
> ==============================================================================<br class="gmail_msg">
> --- llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll (original)<br class="gmail_msg">
> +++ llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll Wed Oct 26 03:55:27 2016<br class="gmail_msg">
> @@ -102,11 +102,11 @@ attributes #1 = { nounwind readnone }<br class="gmail_msg">
> !4 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t")<br class="gmail_msg">
> !5 = !DISubroutineType(types: !6)<br class="gmail_msg">
> !6 = !{null, !7}<br class="gmail_msg">
> -!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8)<br class="gmail_msg">
> -!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, size: 8, align: 8, file: !37, elements: !9)<br class="gmail_msg">
> +!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8)<br class="gmail_msg">
> +!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, size: 8, file: !37, elements: !9)<br class="gmail_msg">
> !9 = !{!10, !12, !14}<br class="gmail_msg">
> !10 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", line: 4, flags: DIFlagStaticMember, file: !37, scope: !8, baseType: !11)<br class="gmail_msg">
> -!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
> +!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, encoding: DW_ATE_signed)<br class="gmail_msg">
> !12 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !4, scope: !8, type: !5, variables: !13)<br class="gmail_msg">
> !13 = !{} ; previously: invalid DW_TAG_base_type<br class="gmail_msg">
> !14 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !4, scope: !8, type: !15, variables: !17)<br class="gmail_msg">
> @@ -124,7 +124,7 @@ attributes #1 = { nounwind readnone }<br class="gmail_msg">
> !26 = !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8)<br class="gmail_msg">
> !27 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11)<br class="gmail_msg">
> !28 = !DILocalVariable(name: "this", line: 9, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !3, file: !4, type: !29)<br class="gmail_msg">
> -!29 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)<br class="gmail_msg">
> +!29 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !8)<br class="gmail_msg">
> !30 = !DILocation(line: 9, scope: !3)<br class="gmail_msg">
> !31 = !DILocation(line: 10, scope: !3)<br class="gmail_msg">
> !32 = !DILocation(line: 11, scope: !3)<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> llvm-commits mailing list<br class="gmail_msg">
> <a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div>