[llvm-branch-commits] [compiler-rt] [llvm] [msan][aarch64] Improve argument classification (PR #72728)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 17 16:44:37 PST 2023


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 76096426dca77bb1ac58c3c7d2f840a2c19b691d f89ff5e38973bfec4ce23799e8ae935e52646a60 -- compiler-rt/test/msan/vararg_shadow.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index d0551f1c9e..94af63da38 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -5074,24 +5074,24 @@ struct VarArgAArch64Helper : public VarArgHelperBase {
   // A very rough approximation of aarch64 argument classification rules.
   std::pair<ArgKind, uint64_t> classifyArgument(Type *T) {
     if (T->isIntOrPtrTy() && T->getPrimitiveSizeInBits() <= 64)
-      return { AK_GeneralPurpose, 1 };
+      return {AK_GeneralPurpose, 1};
     if (T->isFloatingPointTy() && T->getPrimitiveSizeInBits() <= 128)
       return {AK_FloatingPoint, 1};
-    
+
     if (T->isArrayTy()) {
       auto R = classifyArgument(T->getArrayElementType());
       R.second *= T->getScalarType()->getArrayNumElements();
       return R;
     }
 
-    if (const FixedVectorType* FV = dyn_cast<FixedVectorType>(T)) {
+    if (const FixedVectorType *FV = dyn_cast<FixedVectorType>(T)) {
       auto R = classifyArgument(FV->getScalarType());
       R.second *= FV->getNumElements();
       return R;
     }
 
     LLVM_DEBUG(errs() << "Unknown vararg type: " << *T << "\n");
-    return { AK_Memory, 0};
+    return {AK_Memory, 0};
   }
 
   // The instrumentation stores the argument shadow in a non ABI-specific

``````````

</details>


https://github.com/llvm/llvm-project/pull/72728


More information about the llvm-branch-commits mailing list