-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeGenC] Use PrimFuncNode::ret_type in function signature (#15073)
Prior to this PR, the return type for `CodeGenC` was hard-coded as part of `virtual CodeGenC::PrintFuncPrefix`, regardless of the return type specified in the `PrimFunc`. This PR updates `CodeGenC` to use `PrimFuncNode::ret_type` for the return type in the generated C code. This change should have no effect on observable behavior. The majority of codegen classes specified a `void` return type, which matches the default `DataType::Void()` for a `PrimFunc`. The one exception is `CodeGenCHost::PrintFuncPrefix`, which specified an `int32_t` return type, matching the `DataType::Int(32)` used for the functions generated by `MakePackedAPI` and `MakeUnpackedAPI`.
- Loading branch information
1 parent
70532b8
commit 68ac909
Showing
7 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters