diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-05-01 19:04:42 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-05-13 15:22:27 -0700 |
commit | 2155dc51d700c9fb5f29d79eaacf5e1470e4d8ca (patch) | |
tree | 1feb59ca9d39696d3a94a051c08f8c454c03e9cf /llvm/lib/AsmParser/LLLexer.cpp | |
parent | 83ff0ff46337422171fb36f934bd56c2bc1be15c (diff) | |
download | llvm-2155dc51d700c9fb5f29d79eaacf5e1470e4d8ca.zip llvm-2155dc51d700c9fb5f29d79eaacf5e1470e4d8ca.tar.gz llvm-2155dc51d700c9fb5f29d79eaacf5e1470e4d8ca.tar.bz2 |
[IR] Introduce the opaque pointer type
The opaque pointer type is essentially just a normal pointer type with a
null pointee type.
This also adds support for the opaque pointer type to the bitcode
reader/writer, as well as to textual IR.
To avoid confusion with existing pointer types, we disallow creating a
pointer to an opaque pointer.
Opaque pointer types should not be widely used at this point since many
parts of LLVM still do not support them. The next steps are to add some
very simple use cases of opaque pointers to make sure they work, then
start pretending that all pointers are opaque pointers and see what
breaks.
https://lists.llvm.org/pipermail/llvm-dev/2021-May/150359.html
Reviewed By: dblaikie, dexonsmith, pcc
Differential Revision: https://reviews.llvm.org/D101704
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLLexer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index b882291e..67227f0 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -845,6 +845,7 @@ lltok::Kind LLLexer::LexIdentifier() { TYPEKEYWORD("x86_mmx", Type::getX86_MMXTy(Context)); TYPEKEYWORD("x86_amx", Type::getX86_AMXTy(Context)); TYPEKEYWORD("token", Type::getTokenTy(Context)); + TYPEKEYWORD("ptr", PointerType::getUnqual(Context)); #undef TYPEKEYWORD |