Branch: refs/heads/main
Revision: d73dddd8695580f09bc21c7a36635469a5e6af6e
Author: dlongnecke-cray
Link: Improve pragma "opaque c type alias", add support for "int" by dlongnecke-cray · Pull Request #28655 · chapel-lang/chapel · GitHub
Log Message:
Improve pragma "opaque c type alias", add support for "int" (#28655)
Previously, the code would break if multiple extern types used the same
alias e.g., two types using "char". While here, factor out the mapping
between a C type name and the Chapel 'c_...' type to live in a common
place. Also add support for "int" since that is used in the signature of
chpl_library_init.
Reviewed by @jabraham17. Thanks!
Diff:
M compiler/AST/wellknown.cpp
M compiler/codegen/cg-symbol.cpp
M compiler/include/wellknown.h
M compiler/llvm/clangUtil.cpp
M test/interop/C/OpaqueCharAlias.chpl
M test/interop/C/use_OpaqueCharAlias.good
M test/interop/C/use_OpaqueCharAlias.prediff
https://github.com/chapel-lang/chapel/pull/28655.diff