forked from llvm/clangir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][CirGen][Bugfix] Fixes __sync_fetch_and_add for unsigned integers (
llvm#799) `__sync_fetch_and_add` currently doesn't support unsigned integers. The following code snippet, for example, raises an error: ``` #include <stdint.h> void foo(uint64_t x) { __sync_fetch_and_add(&x, 1); } ``` The error can be traced down to this line `auto intType = builder.getSIntNTy(cgf.getContext().getTypeSize(typ));` from `clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp`.
- Loading branch information
1 parent
2f86e11
commit 403f4dc
Showing
3 changed files
with
32 additions
and
2 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