forked from OSchip/llvm-project
Further simplify CGDebugInfo::getOrCreateModuleRef().
DIBuilder ignoers DICompileUnits that are passed in as scopes anyway. llvm-svn: 248077
This commit is contained in:
parent
532365abe8
commit
2f957ac092
|
@ -1702,19 +1702,17 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod,
|
|||
}
|
||||
}
|
||||
|
||||
llvm::DIModule *M = nullptr;
|
||||
if (CreateSkeletonCU) {
|
||||
llvm::DIBuilder DIB(CGM.getModule());
|
||||
auto *CU = DIB.createCompileUnit(
|
||||
TheCU->getSourceLanguage(), Mod.FullModuleName, Mod.Path,
|
||||
TheCU->getProducer(), true, StringRef(), 0, Mod.ASTFile,
|
||||
llvm::DIBuilder::FullDebug, Mod.Signature);
|
||||
M = DIB.createModule(CU, Mod.FullModuleName, ConfigMacros, Mod.Path,
|
||||
CGM.getHeaderSearchOpts().Sysroot);
|
||||
DIB.createCompileUnit(TheCU->getSourceLanguage(), Mod.FullModuleName,
|
||||
Mod.Path, TheCU->getProducer(), true, StringRef(), 0,
|
||||
Mod.ASTFile, llvm::DIBuilder::FullDebug,
|
||||
Mod.Signature);
|
||||
DIB.finalize();
|
||||
} else
|
||||
M = DBuilder.createModule(TheCU, Mod.FullModuleName, ConfigMacros, Mod.Path,
|
||||
CGM.getHeaderSearchOpts().Sysroot);
|
||||
}
|
||||
llvm::DIModule *M =
|
||||
DBuilder.createModule(TheCU, Mod.FullModuleName, ConfigMacros, Mod.Path,
|
||||
CGM.getHeaderSearchOpts().Sysroot);
|
||||
ModRef.reset(M);
|
||||
return M;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue