aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorTim Keith <tkeith@nvidia.com>2020-12-02 10:28:48 -0800
committerTim Keith <tkeith@nvidia.com>2020-12-02 10:28:49 -0800
commit1f525ece4abfb6077d73e34acac0666855d19052 (patch)
tree9ebdd3bec8d03d78e27112da56c3ea235907c5a0 /clang/lib/Basic/Module.cpp
parent291cc1bbea1f4a6cab829509e95b3efe40af908f (diff)
downloadllvm-1f525ece4abfb6077d73e34acac0666855d19052.zip
llvm-1f525ece4abfb6077d73e34acac0666855d19052.tar.gz
llvm-1f525ece4abfb6077d73e34acac0666855d19052.tar.bz2
[flang][NFC] Add GetTopLevelUnitContaining functions
`GetTopLevelUnitContaining` returns the Scope nested in the global scope that contains the given Scope or Symbol. Use "Get" rather than "Find" in the name because "Find" implies it might not be found, which can't happen. Following that logic, rename `FindProgramUnitContaining` to `GetProgramUnitContaining` and have it also return a reference rather that a pointer. Note that the use of "ProgramUnit" is slightly confusing. In the Fortran standard, "program-unit" refers to what is called a "TopLevelUnit" here. What we are calling a "ProgramUnit" (here and in `ProgramTree`) includes internal subprograms while "TopLevelUnit" does not. Differential Revision: https://reviews.llvm.org/D92491
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions