diff options
author | yronglin <yronglin777@gmail.com> | 2025-04-17 22:40:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-17 22:40:47 +0800 |
commit | d83b639b4c62924deef504f46e573e7d995ea10d (patch) | |
tree | fda59205ff14c0c04d49ec15db174456c5cb42fa /clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp | |
parent | 78857e7263ba555fb40b286c6b40fcd35a85a65a (diff) | |
download | llvm-d83b639b4c62924deef504f46e573e7d995ea10d.zip llvm-d83b639b4c62924deef504f46e573e7d995ea10d.tar.gz llvm-d83b639b4c62924deef504f46e573e7d995ea10d.tar.bz2 |
Reland [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (#136077)
This PR reland https://github.com/llvm/llvm-project/pull/135808, fixed
some missed changes in LLDB.
I found this issue when I working on
https://github.com/llvm/llvm-project/pull/107168.
Currently we have many similiar data structures like:
- std::pair<IdentifierInfo *, SourceLocation>.
- Element type of ModuleIdPath.
- IdentifierLocPair.
- IdentifierLoc.
This PR unify these data structures to IdentifierLoc, moved
IdentifierLoc definition to SourceLocation.h, and deleted other similer
data structures.
---------
Signed-off-by: yronglin <yronglin777@gmail.com>
Diffstat (limited to 'clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp')
-rw-r--r-- | clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp index 429bf82..07856db 100644 --- a/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp +++ b/clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp @@ -664,7 +664,7 @@ void ModuleDepCollectorPP::moduleImport(SourceLocation ImportLoc, const Module *Imported) { if (MDC.ScanInstance.getPreprocessor().isInImportingCXXNamedModules()) { P1689ModuleInfo RequiredModule; - RequiredModule.ModuleName = Path[0].first->getName().str(); + RequiredModule.ModuleName = Path[0].getIdentifierInfo()->getName().str(); RequiredModule.Type = P1689ModuleInfo::ModuleType::NamedCXXModule; MDC.RequiredStdCXXModules.push_back(RequiredModule); return; |