[clang] [NFC] Remove unnecessary copy of Triple in ItaniumMangle.cpp (PR #102469)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 06:58:15 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Abhina Sree (abhina-sree)
<details>
<summary>Changes</summary>
Remove unnecessary copy of Triple
---
Full diff: https://github.com/llvm/llvm-project/pull/102469.diff
1 Files Affected:
- (modified) clang/lib/AST/ItaniumMangle.cpp (+1-3)
``````````diff
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index dc317f2a7870b..976670d1efa56 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -2727,8 +2727,6 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp
// <type> ::= U <OpenCL-addrspace>
// <type> ::= U <CUDA-addrspace>
- llvm::Triple Triple = getASTContext().getTargetInfo().getTriple();
-
SmallString<64> ASString;
LangAS AS = Quals.getAddressSpace();
@@ -2800,7 +2798,7 @@ void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSp
// For z/OS, there are no special mangling rules applied to the ptr32
// qualifier. Ex: void foo(int * __ptr32 p) -> _Z3f2Pi. The mangling for
// "p" is treated the same as a regular integer pointer.
- if (!Triple.isOSzOS())
+ if (!getASTContext().getTargetInfo().getTriple().isOSzOS())
ASString = "ptr32_uptr";
break;
case LangAS::ptr64:
``````````
</details>
https://github.com/llvm/llvm-project/pull/102469
More information about the cfe-commits
mailing list