A check is also added to skip metadata types in function parameter lists, which are seen in Clang output. This avoids an assertion.
This pull request fixes one of the issues described in https://github.com/JuliaComputingOSS/llvm-cbe/issues/132. The struct types change is the main part of this, but adding that revealed additional issues (metadata, array types) so I had to fix them too.
I'll freely admit this patch is suboptimal. It will create unused function typedefs for all the global functions, and I would guess it forward-declares array types unnecessarily sometimes. It does also fix real problems, though. I think in the longer term, it might be a good idea to completely rewrite the code for handling definitions and declarations…
A check is also added to skip metadata types in function parameter lists, which are seen in Clang output. This avoids an assertion.
This pull request fixes one of the issues described in https://github.com/JuliaComputingOSS/llvm-cbe/issues/132. The struct types change is the main part of this, but adding that revealed additional issues (metadata, array types) so I had to fix them too.
I'll freely admit this patch is suboptimal. It will create unused function typedefs for all the global functions, and I would guess it forward-declares array types unnecessarily sometimes. It does also fix real problems, though. I think in the longer term, it might be a good idea to completely rewrite the code for handling definitions and declarations…