[all-commits] [llvm/llvm-project] 20bbad: [clang] Define ptrauth_sign_constant builtin.

Ahmed Bougacha via All-commits all-commits at lists.llvm.org
Tue Jun 18 18:02:41 PDT 2024


  Branch: refs/heads/users/ahmedbougacha/ptrauth-sign-constant
  Home:   https://github.com/llvm/llvm-project
  Commit: 20bbad26fa9f068910baf50b5abb60a0f4557564
      https://github.com/llvm/llvm-project/commit/20bbad26fa9f068910baf50b5abb60a0f4557564
  Author: Ahmed Bougacha <ahmed at bougacha.org>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    M clang/include/clang/Basic/Builtins.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/CodeGen/CodeGenABITypes.h
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/CGExprConstant.cpp
    A clang/lib/CodeGen/CGPointerAuth.cpp
    M clang/lib/CodeGen/CMakeLists.txt
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/Headers/ptrauth.h
    M clang/lib/Sema/SemaChecking.cpp
    A clang/test/CodeGen/ptrauth-intrinsic-sign-constant.c
    M clang/test/Sema/ptrauth-intrinsics-macro.c
    M clang/test/Sema/ptrauth.c

  Log Message:
  -----------
  [clang] Define ptrauth_sign_constant builtin.

This is constant-expression equivalent to __builtin_ptrauth_sign,
allowing its usage in global initializers, but requiring constant
pointers and discriminators.

Co-Authored-By: John McCall <rjmccall at apple.com>


  Commit: f5a87e536ddc6f5d1f4ac59f4dfdbbf156c23ed1
      https://github.com/llvm/llvm-project/commit/f5a87e536ddc6f5d1f4ac59f4dfdbbf156c23ed1
  Author: Ahmed Bougacha <ahmed at bougacha.org>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    M clang/docs/PointerAuthentication.rst

  Log Message:
  -----------
  Document ptrauth_sign_constant in clang/docs/PointerAuthentication.


  Commit: 88b097dd4a59bec12d44aa29f820d47c28a4b33f
      https://github.com/llvm/llvm-project/commit/88b097dd4a59bec12d44aa29f820d47c28a4b33f
  Author: Ahmed Bougacha <ahmed at bougacha.org>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    M clang/include/clang/CodeGen/CodeGenABITypes.h
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/lib/CodeGen/CGPointerAuth.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/ptrauth-intrinsic-sign-constant.c

  Log Message:
  -----------
  Address feedback.

- test elf as well
- rename every variable.


  Commit: 6e7ba735684787ce2ec85d9fdf46bd34c45c61a1
      https://github.com/llvm/llvm-project/commit/6e7ba735684787ce2ec85d9fdf46bd34c45c61a1
  Author: Ahmed Bougacha <ahmed at bougacha.org>
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
    M clang/docs/PointerAuthentication.rst
    M clang/include/clang/CodeGen/CodeGenABITypes.h
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/lib/CodeGen/CGPointerAuth.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/Headers/ptrauth.h
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/ptrauth.c

  Log Message:
  -----------
  Simplify some functionality and address review feedback.

- don't reject weakref base pointers (allowed in quals now anyway)
- fold buildConstantAddress into getConstantSignedPointer (originally
  to provide a caching layer for global wrappers but not needed anymore)
- remove stripPointerCasts from it (originally for typed pointers)
- use ConstantInt for the integer/other component of discriminators
- remove CodeGen:: helper (originally for swift but not required)
- rejigger tests; try for parity in fn body and global init
- add a couple missing tests
- tweak doc/header comment
- adopt 'can be used in cst exprs' phrasing from LangExts doc
- various nits, naming, and format


Compare: https://github.com/llvm/llvm-project/compare/33cdfdd5f67a...6e7ba7356847

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list