Relax assertion to account for private framework modules, too.
rdar://problem/48116069
llvm-svn: 354165
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index ce48f8b..e2da77f 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2299,8 +2299,8 @@
// 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()) {