[all-commits] [llvm/llvm-project] fa8080: [AST][SVE] Add new Type queries for sizeless types
rsandifo-arm via All-commits
all-commits at lists.llvm.org
Thu Mar 12 09:33:26 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fa8080376e739e2148aa53715dc93e5406f53fd2
https://github.com/llvm/llvm-project/commit/fa8080376e739e2148aa53715dc93e5406f53fd2
Author: Richard Sandiford <richard.sandiford at arm.com>
Date: 2020-03-12 (Thu, 12 Mar 2020)
Changed paths:
M clang/include/clang/AST/CanonicalType.h
M clang/include/clang/AST/Type.h
M clang/lib/AST/Type.cpp
M clang/unittests/AST/CMakeLists.txt
A clang/unittests/AST/SizelessTypesTest.cpp
Log Message:
-----------
[AST][SVE] Add new Type queries for sizeless types
One of the defining features of the SVE ACLE types is that they
are "sizeless"; see the SVE ACLE spec:
https://developer.arm.com/docs/100987/0000/arm-c-language-extensions-for-sve
or the email message:
http://lists.llvm.org/pipermail/cfe-dev/2019-June/062523.html
for a fuller definition of what that means.
This patch adds two associated type queries:
- isSizelessBuiltinType asks specifically about types that are built
into clang. It is effectively an enum range check.
- isSizelessType instead tests for any type that has the "sizeless" type
property. At the moment it only returns true for the built-in types,
but it seems better not to hard-code that assumption throughout
the codebase. (E.g. we could in principle support some form of
user-defined sizeless types in future. Even if that seems unlikely
and never actually happens, the possibility at least exists.)
Differential Revision: https://reviews.llvm.org/D75570
More information about the All-commits
mailing list