summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-10-09 16:38:47 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-10-09 16:38:47 +0000
commit22314179f0660c172514b397060fd8f34b586e82 (patch)
treeafb3f04cd285733772ffceec4ccf3d8539dca91c /lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll
parentdf14bd315db94d286c0c75b4b6ee5d760f311399 (diff)
downloadbcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.tar.gz
bcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.zip
[test] Split LLDB tests into API, Shell & Unit
LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184
Diffstat (limited to 'lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll')
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll52
1 files changed, 52 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll b/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll
new file mode 100644
index 00000000000..6097345bd99
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll
@@ -0,0 +1,52 @@
+; Test finding types by CompilerContext.
+; RUN: llc %s -filetype=obj -o %t.o
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN: -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmoduleX" \
+; RUN: | FileCheck %s --check-prefix=NORESULTS
+; RUN: lldb-test symbols %t.o -find=type --language=C++ \
+; RUN: -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmodule" \
+; RUN: | FileCheck %s --check-prefix=NORESULTS
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN: -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmodule" \
+; RUN: | FileCheck %s
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN: -compiler-context="Module:CModule,AnyModule:*,Struct:FromSubmodule" \
+; RUN: | FileCheck %s
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN: -compiler-context="AnyModule:*,Struct:FromSubmodule" \
+; RUN: | FileCheck %s
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN: -compiler-context="Module:CModule,Module:SubModule,AnyType:FromSubmodule" \
+; RUN: | FileCheck %s
+;
+; NORESULTS: Found 0 types
+; CHECK: Found 1 types:
+; CHECK: struct FromSubmodule {
+; CHECK-NEXT: unsigned int x;
+; CHECK-NEXT: unsigned int y;
+; CHECK-NEXT: unsigned int z;
+; CHECK-NEXT: }
+
+source_filename = "/t.c"
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.14.0"
+
+!llvm.dbg.cu = !{!2}
+!llvm.linker.options = !{}
+!llvm.module.flags = !{!18, !19}
+!llvm.ident = !{!22}
+
+; This simulates the debug info for a Clang module.
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, nameTableKind: GNU, retainedTypes: !{!11})
+!3 = !DIFile(filename: "t.c", directory: "/")
+!8 = !DIModule(scope: !9, name: "SubModule", includePath: "", isysroot: "/")
+!9 = !DIModule(scope: null, name: "CModule", includePath: "", isysroot: "/")
+!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "FromSubmodule", scope: !8, file: !3, line: 1, size: 96, elements: !13)
+!13 = !{!14, !16, !17}
+!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !11, file: !3, line: 2, baseType: !15, size: 32)
+!15 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !11, file: !3, line: 2, baseType: !15, size: 32, offset: 32)
+!17 = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !11, file: !3, line: 2, baseType: !15, size: 32, offset: 64)
+!18 = !{i32 2, !"Dwarf Version", i32 4}
+!19 = !{i32 2, !"Debug Info Version", i32 3}
+!22 = !{!"clang version 10.0.0 (https://github.com/llvm/llvm-project 056f1b5cc7c2133f0cb3e30e7f24808d321096d7)"}
OpenPOWER on IntegriCloud