forked from OSchip/llvm-project
Rename ASTSourceDescriptor::ModuleName to FullModuleName for clarity.
llvm-svn: 248070
This commit is contained in:
parent
c6458d6a4d
commit
2d3d6dfe1c
|
@ -146,12 +146,13 @@ public:
|
|||
/// everything needed to generate debug info for an imported module
|
||||
/// or PCH.
|
||||
struct ASTSourceDescriptor {
|
||||
ASTSourceDescriptor(){};
|
||||
ASTSourceDescriptor(std::string Name, std::string Path, std::string ASTFile,
|
||||
uint64_t Signature)
|
||||
: ModuleName(Name), Path(Path), ASTFile(ASTFile),
|
||||
: FullModuleName(Name), Path(Path), ASTFile(ASTFile),
|
||||
Signature(Signature){};
|
||||
ASTSourceDescriptor(const Module &M);
|
||||
std::string ModuleName;
|
||||
std::string FullModuleName;
|
||||
std::string Path;
|
||||
std::string ASTFile;
|
||||
uint64_t Signature = 0;
|
||||
|
|
|
@ -29,7 +29,7 @@ ExternalASTSource::getSourceDescriptor(unsigned ID) {
|
|||
}
|
||||
|
||||
ExternalASTSource::ASTSourceDescriptor::ASTSourceDescriptor(const Module &M)
|
||||
: ModuleName(M.getFullModuleName()), Signature(M.Signature) {
|
||||
: FullModuleName(M.getFullModuleName()), Signature(M.Signature) {
|
||||
if (M.Directory)
|
||||
Path = M.Directory->getName();
|
||||
if (auto *File = M.getASTFile())
|
||||
|
|
|
@ -1675,7 +1675,7 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
|
|||
llvm::DIModule *
|
||||
CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod,
|
||||
bool CreateSkeletonCU) {
|
||||
auto &ModRef = ModuleRefCache[Mod.ModuleName];
|
||||
auto &ModRef = ModuleRefCache[Mod.FullModuleName];
|
||||
if (ModRef)
|
||||
return cast<llvm::DIModule>(ModRef);
|
||||
|
||||
|
@ -1705,15 +1705,15 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod,
|
|||
llvm::DIModule *M = nullptr;
|
||||
if (CreateSkeletonCU) {
|
||||
llvm::DIBuilder DIB(CGM.getModule());
|
||||
auto *CU = DIB.createCompileUnit(TheCU->getSourceLanguage(), Mod.ModuleName,
|
||||
Mod.Path, TheCU->getProducer(), true,
|
||||
StringRef(), 0, Mod.ASTFile,
|
||||
llvm::DIBuilder::FullDebug, Mod.Signature);
|
||||
M = DIB.createModule(CU, Mod.ModuleName, ConfigMacros, Mod.Path,
|
||||
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.finalize();
|
||||
} else
|
||||
M = DBuilder.createModule(TheCU, Mod.ModuleName, ConfigMacros, Mod.Path,
|
||||
M = DBuilder.createModule(TheCU, Mod.FullModuleName, ConfigMacros, Mod.Path,
|
||||
CGM.getHeaderSearchOpts().Sysroot);
|
||||
ModRef.reset(M);
|
||||
return M;
|
||||
|
|
Loading…
Reference in New Issue