llvm/test/Assembler/token.ll
David Majnemer 83fc12aeed [IR] Add support for empty tokens
When working with tokens, it is often the case that one has instructions
which consume a token and produce a new token.  Currently, we have no
mechanism to represent an initial token state.

Instead, we can create a notional "empty token" by inventing a new
constant which captures the semantics we would like.  This new constant
is called ConstantTokenNone and is written textually as "token none".

Differential Revision: http://reviews.llvm.org/D14581

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252811 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-11 21:57:16 +00:00

12 lines
275 B
LLVM

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
; Basic smoke test for token type.
; CHECK: declare void @llvm.token.foobar(token)
declare void @llvm.token.foobar(token)
define void @f() {
call void @llvm.token.foobar(token none)
ret void
}