-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][CIRGen] Ensure proper tmp location for agg exprs (#320)
This PR fixes a bug with wrong arguments passed into the call to `buildAnyExpr`. This function has args with default values, hence the bug occurred. All the changes are even with the clang's original codegen. For the reference, the LLVM IR code for `agg-init.cpp::usev()` function looks like the following: ``` define dso_local void @_Z3usev() #0 { entry: %agg.tmp.ensured = alloca %struct.yep_, align 4 %Status = getelementptr inbounds %struct.yep_, ptr %agg.tmp.ensured, i32 0, i32 0 store i32 0, ptr %Status, align 4 %HC = getelementptr inbounds %struct.yep_, ptr %agg.tmp.ensured, i32 0, i32 1 store i32 0, ptr %HC, align 4 ret void } ```
- Loading branch information
Showing
4 changed files
with
16 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