[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.
Ahmed Bougacha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 1 11:12:15 PDT 2021
ab created this revision.
ab added reviewers: rjmccall, ahatanak, bruno, pcc, apazos, kristof.beyls, t.p.northover, pbarrio, chill, danielkiss, psmith.
ab added a project: clang.
Herald added subscribers: dexonsmith, zzheng, dang, mgorny.
ab requested review of this revision.
Building on D90868 <https://reviews.llvm.org/D90868>, this defines the basic set of pointer authentication clang builtins (provided in a new header, `ptrauth.h`), with diagnostics and IRGen support.
The availability of the builtins is gated on a new flag `-fptrauth-intrinsics`, which is enabled by default by the driver for darwin arm64e.
Note that this only includes the basic intrinsics (matching D90868 <https://reviews.llvm.org/D90868>), and notably excludes `ptrauth_sign_constant`, and `ptrauth_type_discriminator`/`ptrauth_string_discriminator`, which need extra logic to be fully supported. If it helps, I can bring the header/sema support here so that we can review all builtins together, and do full IRGen later.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112941
Files:
clang/include/clang/Basic/Builtins.def
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Basic/Features.def
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Basic/TargetInfo.h
clang/include/clang/Driver/Options.td
clang/include/clang/Sema/Sema.h
clang/lib/Basic/Module.cpp
clang/lib/Basic/TargetInfo.cpp
clang/lib/Basic/Targets/AArch64.cpp
clang/lib/Basic/Targets/AArch64.h
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Darwin.cpp
clang/lib/Driver/ToolChains/Darwin.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Headers/CMakeLists.txt
clang/lib/Headers/module.modulemap
clang/lib/Headers/ptrauth.h
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/ptrauth-intrinsics.c
clang/test/Driver/arch-arm64e.c
clang/test/Modules/Inputs/ptrauth-include-from-darwin/module.modulemap
clang/test/Modules/Inputs/ptrauth-include-from-darwin/ptrauth.h
clang/test/Modules/Inputs/ptrauth-include-from-darwin/stddef.h
clang/test/Modules/ptrauth-include-from-darwin.m
clang/test/Preprocessor/ptrauth_feature.c
clang/test/Sema/ptrauth-intrinsics-macro.c
clang/test/Sema/ptrauth.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112941.383837.patch
Type: text/x-patch
Size: 51468 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211101/5b8975a4/attachment-0001.bin>
More information about the cfe-commits
mailing list