1; Test finding types by CompilerContext. 2; RUN: llc %s -filetype=obj -o %t.o 3; RUN: lldb-test symbols %t.o -find=type --language=C99 \ 4; RUN: -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmoduleX" \ 5; RUN: | FileCheck %s --check-prefix=NORESULTS 6; RUN: lldb-test symbols %t.o -find=type --language=C++ \ 7; RUN: -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmodule" \ 8; RUN: | FileCheck %s --check-prefix=NORESULTS 9; RUN: lldb-test symbols %t.o -find=type --language=C99 \ 10; RUN: -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmodule" \ 11; RUN: | FileCheck %s 12; RUN: lldb-test symbols %t.o -find=type --language=C99 \ 13; RUN: -compiler-context="Module:CModule,AnyModule:*,Struct:FromSubmodule" \ 14; RUN: | FileCheck %s 15; RUN: lldb-test symbols %t.o -find=type --language=C99 \ 16; RUN: -compiler-context="AnyModule:*,Struct:FromSubmodule" \ 17; RUN: | FileCheck %s 18; RUN: lldb-test symbols %t.o -find=type --language=C99 \ 19; RUN: -compiler-context="Module:CModule,Module:SubModule,AnyType:FromSubmodule" \ 20; RUN: | FileCheck %s 21; 22; NORESULTS: Found 0 types 23; CHECK: Found 1 types: 24; CHECK: struct FromSubmodule { 25; CHECK-NEXT: unsigned int x; 26; CHECK-NEXT: unsigned int y; 27; CHECK-NEXT: unsigned int z; 28; CHECK-NEXT: } 29 30source_filename = "/t.c" 31target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 32target triple = "x86_64-apple-macosx10.14.0" 33 34!llvm.dbg.cu = !{!2} 35!llvm.linker.options = !{} 36!llvm.module.flags = !{!18, !19} 37!llvm.ident = !{!22} 38 39; This simulates the debug info for a Clang module. 40!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, nameTableKind: GNU, retainedTypes: !{!11}, sysroot: "/") 41!3 = !DIFile(filename: "t.c", directory: "/") 42!8 = !DIModule(scope: !9, name: "SubModule", includePath: "") 43!9 = !DIModule(scope: null, name: "CModule", includePath: "") 44!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "FromSubmodule", scope: !8, file: !3, line: 1, size: 96, elements: !13) 45!13 = !{!14, !16, !17} 46!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !11, file: !3, line: 2, baseType: !15, size: 32) 47!15 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) 48!16 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !11, file: !3, line: 2, baseType: !15, size: 32, offset: 32) 49!17 = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !11, file: !3, line: 2, baseType: !15, size: 32, offset: 64) 50!18 = !{i32 2, !"Dwarf Version", i32 4} 51!19 = !{i32 2, !"Debug Info Version", i32 3} 52!22 = !{!"clang version 10.0.0 (https://github.com/llvm/llvm-project 056f1b5cc7c2133f0cb3e30e7f24808d321096d7)"} 53