Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C/C++ backend can emit calls to 'internal' funcs without header decls #2075

Closed
steven-johnson opened this issue May 24, 2017 · 1 comment
Closed

Comments

@steven-johnson
Copy link
Contributor

e.g., _halide_buffer functions in src/runtime/buffer_t.cpp
e.g., halide_trace_helper

Do we want to fix this by including 'internal' headers with decls, or by emitting forward declarations for the functions inside Codegen_C?

@steven-johnson
Copy link
Contributor Author

Similarly: calls to external functions (via e.g. HalidePureExtern_1()) also fail in this way. This suggests we should just emit forward declarations.

steven-johnson added a commit that referenced this issue May 25, 2017
Otherwise, different types can cache to the same (incompatible) value of null (e.g. void* and int32*). This is at least a partial fix for Issue #2075.

Also, drive-by improvement to prettyprinting of the struct defs we emit.
abadams added a commit that referenced this issue May 25, 2017
Ensure NULL struct values include typecast (Issue #2075)
steven-johnson added a commit that referenced this issue May 30, 2017
Partial fix for #2075, also fixes generator_aotcpp_cxx_mangling_define_extern
steven-johnson added a commit that referenced this issue May 30, 2017
Partial fix for #2075:
-- The identifier should be a pointer-to-storage, not storage.
-- mark data, shape, and buffer itself as const (except for scalar buffers)
-- Note special-case for #2099
-- drive-by prettyprint improvement (don't put all data on a single line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant