Default constructor isn't optimised out during midend LLVM. #1098
Labels
bug
Something isn't working
IR difference
A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests
If you compile the following code:
with:
clang -O3 -fclangir -S -emit-llvm
The output for
get_num
looks like:While without
-fclangir
it looks like this:Notice that the call to the constructor is not optimized out in the
clangir
modeHere is the link to godbolt that reproduces the issue: https://godbolt.org/z/bTos9qx4d
I think it happens because the default constructor is declared and not defined in the
clangir
mode.Is it a conscious decision or a bug?
The text was updated successfully, but these errors were encountered: