aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlex Zinenko <zinenko@google.com>2021-01-05 17:01:41 +0100
committerAlex Zinenko <zinenko@google.com>2021-01-06 12:05:24 +0100
commit74438eff511e71dc33841546d89cb34206551d55 (patch)
treec36117d3384de373976bdccbf4487e323a0de3d0 /clang/lib/Frontend/CompilerInvocation.cpp
parent351a45ca73de3ec4524d2194674e2a92f8b7d9b5 (diff)
downloadllvm-74438eff511e71dc33841546d89cb34206551d55.zip
llvm-74438eff511e71dc33841546d89cb34206551d55.tar.gz
llvm-74438eff511e71dc33841546d89cb34206551d55.tar.bz2
[mlir] Use thread_local stack in LLVM dialect type parsing and printing
LLVM dialect type parsing and printing have been using a local stack object forwarded between recursive functions responsible for parsing or printing specific types. This stack is necessary to intercept (mutually) recursive structure types and avoid inifinite recursion. This approach works only thanks to the closedness of the LLVM dialect type system: types that don't belong to the dialect are not allowed. Switch the approach to using a `thread_local` stack inside the functions parsing the structure types. This makes the code slightly cleaner by avoiding the need to pass the stack object around and, more importantly, makes it possible to reconsider the closedness of the LLVM dialect type system. As a nice side effect of this change, container LLVM dialect types now support type aliases in their body (although it is currently impossible to also use the alises when printing). Depends On D93713 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D93714
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions