Generate different types for scalar and memory values
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
Currently, `cgeist` generates the same types for scalar and memory values, so compiling:
```cpp
class wrapper {
public:
explicit wrapper(bool b) : b{b} {}
private:
const bool b;
};
wrapper wrap(bool b) { return wrapper{b}; }
```
using `clang` results in a function signature like:
```llvm
define dso_local i8 @_Z4wrapb(i1 noundef zeroext %b)
```
whereas `cgeist` compiles to:
```llvm
define { i8 } @_Z4wrapb(i8 %0)
```
**Describe the solution you would like**
`cgeist` codegen should mimic `clang`'s in that aspect.
**Describe alternatives you have considered**
Handling this in a pass, but it would probably overcomplicate things and not save any time if a different codegen is used (it could already handle the problem).
Contributor guide
Assessment
This issue has not been assessed yet.