diff options
author | Oliver Hunt <oliver@apple.com> | 2025-07-14 19:32:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-14 19:32:18 -0700 |
commit | 451a9ce9ffcf18db365f32a5a01dd025ab26c1d0 (patch) | |
tree | 79013dc921b35ef8be969689052648ec318c9b15 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 90ef114a33805b67eea29564193ad6d4c6975a30 (diff) | |
download | llvm-451a9ce9ffcf18db365f32a5a01dd025ab26c1d0.zip llvm-451a9ce9ffcf18db365f32a5a01dd025ab26c1d0.tar.gz llvm-451a9ce9ffcf18db365f32a5a01dd025ab26c1d0.tar.bz2 |
[clang][ObjC][PAC] Add ptrauth protections to objective-c (#147899)
This PR introduces the use of pointer authentication to objective-c[++].
This includes:
* __ptrauth qualifier support for ivars
* protection of isa and super fields
* protection of SEL typed ivars
* protection of class_ro_t data
* protection of methodlist pointers and content
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c8866f1..678be07 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -6616,7 +6616,9 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { auto Fields = Builder.beginStruct(STy); // Class pointer. - Fields.add(cast<llvm::Constant>(CFConstantStringClassRef)); + Fields.addSignedPointer(cast<llvm::Constant>(CFConstantStringClassRef), + getCodeGenOpts().PointerAuth.ObjCIsaPointers, + GlobalDecl(), QualType()); // Flags. if (IsSwiftABI) { |