diff options
author | Stoorx <me@stoorx.one> | 2023-04-18 23:49:00 +0300 |
---|---|---|
committer | Stoorx <me@stoorx.one> | 2023-04-24 12:05:59 +0300 |
commit | 40136ecefc0a542da7d0f1736c51325edc5539b4 (patch) | |
tree | 252e4cff7890431ff8f77a92184549fee68cc214 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 0a113c4c50f65a7d26d20be84bfb56562154753f (diff) | |
download | llvm-40136ecefc0a542da7d0f1736c51325edc5539b4.zip llvm-40136ecefc0a542da7d0f1736c51325edc5539b4.tar.gz llvm-40136ecefc0a542da7d0f1736c51325edc5539b4.tar.bz2 |
[clang] Make access to submodules via `iterator_range`
In file `clang/lib/Basic/Module.cpp` the `Module` class had `submodule_begin()` and `submodule_end()` functions to retrieve corresponding iterators for private vector of Modules. This commit removes mentioned functions, and replaces all of theirs usages with `submodules()` function and range-based for-loops.
Differential Revision: https://reviews.llvm.org/D148954
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 51fe776..fc1295a 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -605,8 +605,9 @@ struct ReadModuleNames : ASTReaderListener { Module *Current = Stack.pop_back_val(); if (Current->IsUnimportable) continue; Current->IsAvailable = true; - Stack.insert(Stack.end(), - Current->submodule_begin(), Current->submodule_end()); + auto SubmodulesRange = Current->submodules(); + Stack.insert(Stack.end(), SubmodulesRange.begin(), + SubmodulesRange.end()); } } } |