[clang] [NFC] use appropriate castas (PR #95272)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 10:29:37 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-codegen

Author: None (mahesh-attarde)

<details>
<summary>Changes</summary>

NFC fix for appropriate function call.
Requested by aaron while discussing https://github.com/llvm/llvm-project/pull/95257 https://github.com/llvm/llvm-project/pull/95257

---
Full diff: https://github.com/llvm/llvm-project/pull/95272.diff


1 Files Affected:

- (modified) clang/lib/CodeGen/Targets/X86.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index 43dadf5e724ac..433ceaa76c847 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -2834,7 +2834,7 @@ ABIArgInfo
 X86_64ABIInfo::classifyRegCallStructTypeImpl(QualType Ty, unsigned &NeededInt,
                                              unsigned &NeededSSE,
                                              unsigned &MaxVectorWidth) const {
-  auto RT = Ty->getAs<RecordType>();
+  auto RT = Ty->castAs<RecordType>();
   assert(RT && "classifyRegCallStructType only valid with struct types");
 
   if (RT->getDecl()->hasFlexibleArrayMember())

``````````

</details>


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


More information about the cfe-commits mailing list