103 lines · plain
1; ModuleID = '/tmp/odr-lambda-2.ii'2; generated from:3 4; clang++ -x c++ -std=c++14 -fPIC -flto -g -fno-exceptions -fno-rtti5; class Error {};6; template <typename HandlerTs>7; void handleAllErrors( HandlerTs Handlers) {}8; inline void consumeError(Error Err) {9; handleAllErrors( []() {});10; }11; int main(int argc, char **argv) {12; consumeError(Error());13; }14 15source_filename = "/tmp/odr-lambda-2.ii"16target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"17target triple = "x86_64-apple-macosx10.13.0"18 19%class.Error = type { i8 }20%class.anon = type { i8 }21 22; Function Attrs: noinline norecurse nounwind optnone ssp uwtable23define i32 @main(i32 %argc, ptr %argv) #0 !dbg !8 {24entry:25 %argc.addr = alloca i32, align 426 %argv.addr = alloca ptr, align 827 %agg.tmp = alloca %class.Error, align 128 store i32 %argc, ptr %argc.addr, align 429 call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !15, metadata !DIExpression()), !dbg !1630 store ptr %argv, ptr %argv.addr, align 831 call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !17, metadata !DIExpression()), !dbg !1832 call void @_Z12consumeError5Error(), !dbg !1933 ret i32 0, !dbg !2034}35 36; Function Attrs: nounwind readnone speculatable37declare void @llvm.dbg.declare(metadata, metadata, metadata) #138 39; Function Attrs: noinline nounwind optnone ssp uwtable40define linkonce_odr void @_Z12consumeError5Error() #2 !dbg !21 {41entry:42 %Err = alloca %class.Error, align 143 %agg.tmp = alloca %class.anon, align 144 call void @llvm.dbg.declare(metadata ptr %Err, metadata !25, metadata !DIExpression()), !dbg !2645 call void @_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_(), !dbg !2746 ret void, !dbg !2847}48 49; Function Attrs: noinline nounwind optnone ssp uwtable50define linkonce_odr void @_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_() #2 !dbg !29 {51entry:52 %Handlers = alloca %class.anon, align 153 call void @llvm.dbg.declare(metadata ptr %Handlers, metadata !35, metadata !DIExpression()), !dbg !3654 ret void, !dbg !3755}56 57attributes #0 = { noinline norecurse nounwind optnone ssp uwtable }58attributes #1 = { nounwind readnone speculatable }59attributes #2 = { noinline nounwind optnone ssp uwtable }60 61!llvm.dbg.cu = !{!0}62!llvm.module.flags = !{!3, !4, !5, !6}63!llvm.ident = !{!7}64 65!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 6.0.0 (trunk 315772) (llvm/trunk 315773)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)66!1 = !DIFile(filename: "/tmp/odr-lambda-2.ii", directory: "/Data")67!2 = !{}68!3 = !{i32 2, !"Dwarf Version", i32 4}69!4 = !{i32 2, !"Debug Info Version", i32 3}70!5 = !{i32 1, !"wchar_size", i32 4}71!6 = !{i32 7, !"PIC Level", i32 2}72!7 = !{!"clang version 6.0.0 (trunk 315772) (llvm/trunk 315773)"}73!8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)74!9 = !DISubroutineType(types: !10)75!10 = !{!11, !11, !12}76!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)77!12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64)78!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !14, size: 64)79!14 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)80!15 = !DILocalVariable(name: "argc", arg: 1, scope: !8, file: !1, line: 7, type: !11)81!16 = !DILocation(line: 7, column: 14, scope: !8)82!17 = !DILocalVariable(name: "argv", arg: 2, scope: !8, file: !1, line: 7, type: !12)83!18 = !DILocation(line: 7, column: 27, scope: !8)84!19 = !DILocation(line: 8, column: 3, scope: !8)85!20 = !DILocation(line: 9, column: 1, scope: !8)86!21 = distinct !DISubprogram(name: "consumeError", linkageName: "_Z12consumeError5Error", scope: !1, file: !1, line: 4, type: !22, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)87!22 = !DISubroutineType(types: !23)88!23 = !{null, !24}89!24 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "Error", file: !1, line: 1, size: 8, elements: !2, identifier: "_ZTS5Error")90!25 = !DILocalVariable(name: "Err", arg: 1, scope: !21, file: !1, line: 4, type: !24)91!26 = !DILocation(line: 4, column: 32, scope: !21)92!27 = !DILocation(line: 5, column: 3, scope: !21)93!28 = !DILocation(line: 6, column: 1, scope: !21)94!29 = distinct !DISubprogram(name: "handleAllErrors<(lambda at /tmp/odr-lambda-2.ii:5:20)>", linkageName: "_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_", scope: !1, file: !1, line: 3, type: !30, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, templateParams: !33, retainedNodes: !2)95!30 = !DISubroutineType(types: !31)96!31 = !{null, !32}97!32 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !21, file: !1, line: 5, size: 8, elements: !2, identifier: "_ZTSZ12consumeError5ErrorEUlvE_")98!33 = !{!34}99!34 = !DITemplateTypeParameter(name: "HandlerTs", type: !32)100!35 = !DILocalVariable(name: "Handlers", arg: 1, scope: !29, file: !1, line: 3, type: !32)101!36 = !DILocation(line: 3, column: 34, scope: !29)102!37 = !DILocation(line: 3, column: 45, scope: !29)103