Skip to content

llvm: expose token none constant - #1

Merged
cpunion merged 1 commit into
llvm-corofrom
coro/token-none
Jul 15, 2026
Merged

llvm: expose token none constant#1
cpunion merged 1 commit into
llvm-corofrom
coro/token-none

Conversation

@cpunion

@cpunion cpunion commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • expose llvm::ConstantTokenNone::get(Context) as Context.ConstTokenNone()
  • keep the binding to one narrow C++ shim returning the context-owned constant
  • verify the value has token type and prints as token none
  • verify it can be used by llvm.coro.suspend and the version-appropriate llvm.coro.end signature

This is the missing primitive needed for LLVM 19 switched-resume coroutine lowering in llgo.

Validation

  • full go test . with the default LLVM 19 configuration
  • go vet .
  • targeted verifier runs with LLVM 14, 18, 19, 20, and local LLVM 22
  • focused CI covers LLVM 14/18/19/21 on Linux

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the LLVM ConstantTokenNone constant in the Go bindings. It adds a new C binding function LLVMGoConstTokenNone in IRBindings.cpp and IRBindings.h, exposes it as the ConstTokenNone method on the Context struct in ir.go, and includes a comprehensive test suite in ir_test.go to verify its integration with coroutine intrinsics across different LLVM versions. No review comments were provided, so there is no additional feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@cpunion
cpunion merged commit 173f9c7 into llvm-coro Jul 15, 2026
4 checks passed
@cpunion
cpunion deleted the coro/token-none branch July 15, 2026 15:31
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.

1 participant