summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-02-08 23:15:42 +0000
committerAdrian Prantl <aprantl@apple.com>2019-02-08 23:15:42 +0000
commit7b6b9a1afce232a48fc77093c6acd8ffb01be0b9 (patch)
tree3d4fcf95f40af43ae1f9e8a91b85c407c465d1d6 /clang/test
parent1570571ded26df0cc0853eecbf1344e56585c2dc (diff)
downloadbcm5719-llvm-7b6b9a1afce232a48fc77093c6acd8ffb01be0b9.tar.gz
bcm5719-llvm-7b6b9a1afce232a48fc77093c6acd8ffb01be0b9.zip
-gmodules: Don't emit incomplete breadcrumbs pointing to nonexistant PCM files.
When a module name is specified as -fmodule-name, that module gets a clang::Module object, but it won't actually be built or imported; it will be textual. CGDebugInfo wouldn't detect this and them emit a DICompileUnit that had a hash but no name and that confused both dsymutil, LLDB, and myself. rdar://problem/47926508 Differential Revision: https://reviews.llvm.org/D57976 llvm-svn: 353578
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/DebugInfo-fmodule-name.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Modules/DebugInfo-fmodule-name.c b/clang/test/Modules/DebugInfo-fmodule-name.c
new file mode 100644
index 00000000000..6d962bcd274
--- /dev/null
+++ b/clang/test/Modules/DebugInfo-fmodule-name.c
@@ -0,0 +1,16 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodule-format=obj -fmodule-name=F \
+// RUN: -debug-info-kind=limited -dwarf-ext-refs \
+// RUN: -fimplicit-module-maps -x c -fmodules-cache-path=%t -F %S/Inputs \
+// RUN: %s -S -emit-llvm -debugger-tuning=lldb -o - | FileCheck %s
+
+#include "F/F.h"
+
+// CHECK: !DICompileUnit
+// CHECK-NOT: dwoId:
+
+// We still want the import, but no skeleton CU, since no PCM was built.
+
+// CHECK: !DIModule({{.*}}, name: "F"
+// CHECK-NOT: !DICompileUnit
+// CHECK-NOT: dwoId:
OpenPOWER on IntegriCloud