diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2020-11-30 11:34:12 -0800 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2020-11-30 11:34:12 -0800 |
commit | fe431683484a3041e024ab2373bb707b1ca8d1cf (patch) | |
tree | cc85d6f2937d11170552e25d93c42ad9358c563f /clang/unittests/Tooling/SourceCodeTest.cpp | |
parent | abef659a45fff4147f8f0ffd1d0f6600185e4a4e (diff) | |
download | llvm-fe431683484a3041e024ab2373bb707b1ca8d1cf.zip llvm-fe431683484a3041e024ab2373bb707b1ca8d1cf.tar.gz llvm-fe431683484a3041e024ab2373bb707b1ca8d1cf.tar.bz2 |
Creating a named struct requires only a Context and a name, but looking up a struct by name requires a Module. The method on Module merely accesses the LLVMContextImpl and no data from the module itself, so this patch moves getTypeByName to a static method on StructType that takes a Context and a name.
There's a small number of users of this function, they are all updated.
This updates the C API adding a new method LLVMGetTypeByName2 that takes a context and a name.
Differential Revision: https://reviews.llvm.org/D78793
Diffstat (limited to 'clang/unittests/Tooling/SourceCodeTest.cpp')
0 files changed, 0 insertions, 0 deletions