diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-02-15 20:24:26 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-02-15 20:24:26 +0000 |
commit | e308e4299d03e13c59d57a8cb3ed4ebbb7d710b2 (patch) | |
tree | ab56e66c23aefb1e79dbf4840a0c684c08ee89ec | |
parent | 4b512c36b6ab40a63dcf5a76f9f884c3f809df1c (diff) | |
download | bcm5719-llvm-e308e4299d03e13c59d57a8cb3ed4ebbb7d710b2.tar.gz bcm5719-llvm-e308e4299d03e13c59d57a8cb3ed4ebbb7d710b2.zip |
Relax assertion to account for private framework modules, too.
rdar://problem/48116069
llvm-svn: 354165
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 | ||||
-rw-r--r-- | clang/test/Modules/DebugInfo-fmodule-name.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index ce48f8bb132..e2da77f5534 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2299,8 +2299,8 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod, // 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. - if (CreateSkeletonCU && IsRootModule && Mod.getASTFile().empty()) - assert((!M || (M->Name == CGM.getLangOpts().ModuleName)) && + if (CreateSkeletonCU && IsRootModule && Mod.getASTFile().empty() && M) + assert(StringRef(M->Name).startswith(CGM.getLangOpts().ModuleName) && "clang module without ASTFile must be specified by -fmodule-name"); if (CreateSkeletonCU && IsRootModule && !Mod.getASTFile().empty()) { diff --git a/clang/test/Modules/DebugInfo-fmodule-name.c b/clang/test/Modules/DebugInfo-fmodule-name.c index 6d962bcd274..7f2730ddc97 100644 --- a/clang/test/Modules/DebugInfo-fmodule-name.c +++ b/clang/test/Modules/DebugInfo-fmodule-name.c @@ -1,16 +1,16 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodule-format=obj -fmodule-name=F \ +// RUN: %clang_cc1 -fmodules -fmodule-format=obj -fmodule-name=MainA \ // 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" +#include "MainA/MainPriv.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: !DIModule({{.*}}, name: "APriv" // CHECK-NOT: !DICompileUnit // CHECK-NOT: dwoId: |