[llvm-branch-commits] Add deactivation symbol operand to ConstantPtrAuth. (PR #133537)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 28 15:37:52 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 384292bdbc7e6e4edf78075df7f69302e5668f95 e4719283434b7bbcb878822bae4158b5cd3657a8 --extensions h,cpp -- clang/lib/CodeGen/CGPointerAuth.cpp llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/include/llvm/IR/Constants.h llvm/include/llvm/SandboxIR/Constant.h llvm/lib/AsmParser/LLParser.cpp llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/IR/AsmWriter.cpp llvm/lib/IR/Constants.cpp llvm/lib/IR/ConstantsContext.h llvm/lib/IR/Core.cpp llvm/lib/SandboxIR/Constant.cpp llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/Utils/ValueMapper.cpp llvm/unittests/SandboxIR/SandboxIRTest.cpp llvm/unittests/Transforms/Utils/ValueMapperTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Bitcode/LLVMBitCodes.h b/llvm/include/llvm/Bitcode/LLVMBitCodes.h
index 13521ba6cd..ec47a29c69 100644
--- a/llvm/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/llvm/include/llvm/Bitcode/LLVMBitCodes.h
@@ -431,7 +431,7 @@ enum ConstantsCodes {
CST_CODE_CE_GEP_WITH_INRANGE = 31, // [opty, flags, range, n x operands]
CST_CODE_CE_GEP = 32, // [opty, flags, n x operands]
CST_CODE_PTRAUTH = 33, // [ptr, key, disc, addrdisc]
- CST_CODE_PTRAUTH2 = 34, // [ptr, key, disc, addrdisc, DeactivationSymbol]
+ CST_CODE_PTRAUTH2 = 34, // [ptr, key, disc, addrdisc, DeactivationSymbol]
};
/// CastOpcodes - These are values used in the bitcode files to encode which
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index dfa014aa0b..26e4476fab 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -4226,7 +4226,8 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
}
case lltok::kw_ptrauth: {
// ValID ::= 'ptrauth' '(' ptr @foo ',' i32 <key>
- // (',' i64 <disc> (',' ptr addrdisc (',' ptr ds)? )? )? ')'
+ // (',' i64 <disc> (',' ptr addrdisc (',' ptr ds)?
+ // )? )? ')'
Lex.Lex();
Constant *Ptr, *Key;
@@ -4280,10 +4281,11 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
if (DeactivationSymbol) {
if (!DeactivationSymbol->getType()->isPointerTy())
- return error(
- ID.Loc, "constant ptrauth deactivation symbol must be a pointer");
+ return error(ID.Loc,
+ "constant ptrauth deactivation symbol must be a pointer");
} else {
- DeactivationSymbol = ConstantPointerNull::get(PointerType::get(Context, 0));
+ DeactivationSymbol =
+ ConstantPointerNull::get(PointerType::get(Context, 0));
}
ID.ConstantVal =
``````````
</details>
https://github.com/llvm/llvm-project/pull/133537
More information about the llvm-branch-commits
mailing list