[IR] Add support for empty tokens
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 11 Nov 2015 21:57:16 +0000 (21:57 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 11 Nov 2015 21:57:16 +0000 (21:57 +0000)
commit83fc12aeed03b6423fdf973ad4ae351202fe0982
treeb3120aadad30d5a7736a5742c2030504892ee241
parentab31dd0adda16c16cccfb21a0bc3ad590a4fe75c
[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
14 files changed:
docs/LangRef.rst
include/llvm-c/Core.h
include/llvm/IR/Constants.h
include/llvm/IR/Value.def
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/AsmParser/LLToken.h
lib/IR/AsmWriter.cpp
lib/IR/Constants.cpp
lib/IR/LLVMContextImpl.cpp
lib/IR/LLVMContextImpl.h
lib/Transforms/IPO/MergeFunctions.cpp
test/Assembler/token.ll