Skip to content

Conversation

@robertoraggi
Copy link
Owner

@robertoraggi robertoraggi commented Jul 23, 2025

They are missing traits, custom builders and
assembly labels.

Fixes #616

void f() {}

int main(int argc, char** argv) {}

$ cxx x.c -emit-ir

!i32s = !cxx.int<32, true>
module @x.c {
  cxx.func @f() {
    cf.br ^bb1
  ^bb1:  // pred: ^bb0
    "cxx.return"() : () -> ()
  }
  cxx.func @main(%arg0: !i32s, %arg1: !cxx.ptr<!cxx.ptr<!cxx.expr>>) -> !i32s {
    %0 = "cxx.alloca"() : () -> !cxx.ptr<!i32s>
    cf.br ^bb1(%0 : !cxx.ptr<!i32s>)
  ^bb1(%1: !cxx.ptr<!i32s>):  // pred: ^bb0
    %2 = "cxx.load"(%0) : (!cxx.ptr<!i32s>) -> !i32s
    "cxx.return"(%2) : (!i32s) -> ()
  }
}

They are missing traits, custom builders and
assembly labels.

Fixes #616

Signed-off-by: Roberto Raggi <[email protected]>
@robertoraggi robertoraggi merged commit 6bedfda into main Jul 24, 2025
9 checks passed
@robertoraggi robertoraggi deleted the robertoraggi/issue616 branch July 24, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Basic AllocaOp, LoadOp and StoreOp and conversions to the LLVM dialect

2 participants