Rename ASTSourceDescriptor::ModuleName to FullModuleName for clarity.

llvm-svn: 248070
This commit is contained in:
Adrian Prantl 2015-09-19 00:10:37 +00:00
parent c6458d6a4d
commit 2d3d6dfe1c
3 changed files with 11 additions and 10 deletions

View File

@ -146,12 +146,13 @@ public:
/// everything needed to generate debug info for an imported module /// everything needed to generate debug info for an imported module
/// or PCH. /// or PCH.
struct ASTSourceDescriptor { struct ASTSourceDescriptor {
ASTSourceDescriptor(){};
ASTSourceDescriptor(std::string Name, std::string Path, std::string ASTFile, ASTSourceDescriptor(std::string Name, std::string Path, std::string ASTFile,
uint64_t Signature) uint64_t Signature)
: ModuleName(Name), Path(Path), ASTFile(ASTFile), : FullModuleName(Name), Path(Path), ASTFile(ASTFile),
Signature(Signature){}; Signature(Signature){};
ASTSourceDescriptor(const Module &M); ASTSourceDescriptor(const Module &M);
std::string ModuleName; std::string FullModuleName;
std::string Path; std::string Path;
std::string ASTFile; std::string ASTFile;
uint64_t Signature = 0; uint64_t Signature = 0;

View File

@ -29,7 +29,7 @@ ExternalASTSource::getSourceDescriptor(unsigned ID) {
} }
ExternalASTSource::ASTSourceDescriptor::ASTSourceDescriptor(const Module &M) ExternalASTSource::ASTSourceDescriptor::ASTSourceDescriptor(const Module &M)
: ModuleName(M.getFullModuleName()), Signature(M.Signature) { : FullModuleName(M.getFullModuleName()), Signature(M.Signature) {
if (M.Directory) if (M.Directory)
Path = M.Directory->getName(); Path = M.Directory->getName();
if (auto *File = M.getASTFile()) if (auto *File = M.getASTFile())

View File

@ -1675,7 +1675,7 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
llvm::DIModule * llvm::DIModule *
CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod, CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod,
bool CreateSkeletonCU) { bool CreateSkeletonCU) {
auto &ModRef = ModuleRefCache[Mod.ModuleName]; auto &ModRef = ModuleRefCache[Mod.FullModuleName];
if (ModRef) if (ModRef)
return cast<llvm::DIModule>(ModRef); return cast<llvm::DIModule>(ModRef);
@ -1705,15 +1705,15 @@ CGDebugInfo::getOrCreateModuleRef(ExternalASTSource::ASTSourceDescriptor Mod,
llvm::DIModule *M = nullptr; llvm::DIModule *M = nullptr;
if (CreateSkeletonCU) { if (CreateSkeletonCU) {
llvm::DIBuilder DIB(CGM.getModule()); llvm::DIBuilder DIB(CGM.getModule());
auto *CU = DIB.createCompileUnit(TheCU->getSourceLanguage(), Mod.ModuleName, auto *CU = DIB.createCompileUnit(
Mod.Path, TheCU->getProducer(), true, TheCU->getSourceLanguage(), Mod.FullModuleName, Mod.Path,
StringRef(), 0, Mod.ASTFile, TheCU->getProducer(), true, StringRef(), 0, Mod.ASTFile,
llvm::DIBuilder::FullDebug, Mod.Signature); llvm::DIBuilder::FullDebug, Mod.Signature);
M = DIB.createModule(CU, Mod.ModuleName, ConfigMacros, Mod.Path, M = DIB.createModule(CU, Mod.FullModuleName, ConfigMacros, Mod.Path,
CGM.getHeaderSearchOpts().Sysroot); CGM.getHeaderSearchOpts().Sysroot);
DIB.finalize(); DIB.finalize();
} else } else
M = DBuilder.createModule(TheCU, Mod.ModuleName, ConfigMacros, Mod.Path, M = DBuilder.createModule(TheCU, Mod.FullModuleName, ConfigMacros, Mod.Path,
CGM.getHeaderSearchOpts().Sysroot); CGM.getHeaderSearchOpts().Sysroot);
ModRef.reset(M); ModRef.reset(M);
return M; return M;