[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/73374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Thanks, this was never properly cleaned up after moving to opaque pointers. https://github.com/llvm/llvm-project/pull/73374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/73374 >From cd36ba2c52f14051cbe82efc6390a036f75d2b46 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Thu, 23 Nov 2023 10:54:07 -0600 Subject: [PATCH 1/3] [clang-linker-wrapper] Re-use type returned from

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Joseph Huber via cfe-commits
@@ -457,45 +457,42 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, IsHIP ? ".hip.fatbin_unreg" : ".cuda.fatbin_unreg", ); DtorFunc->setSection(".text.startup"); + auto *PtrTy = PointerType::getUnqual(C); + // Get the

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 12563ea6403f6f5a467862732b92db3517626cd2 3d46f90bc8cf5d94ea5adae80bc9c96e11958b32 --

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/73374 >From cd36ba2c52f14051cbe82efc6390a036f75d2b46 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Thu, 23 Nov 2023 10:54:07 -0600 Subject: [PATCH 1/2] [clang-linker-wrapper] Re-use type returned from

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/73374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Joseph Huber via cfe-commits
@@ -458,44 +459,39 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, DtorFunc->setSection(".text.startup"); // Get the __cudaRegisterFatBinary function declaration. - auto *RegFatTy = FunctionType::get(PointerType::getUnqual(C)->getPointerTo(), -

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Multiple calls to `PointerType::getUnqual(C)`, and calls to `Type::getPointerTo(AddrSpace=0)` on them all result in the same type. Clean them up to re-use the same `PtrTy` variable within function

[clang] [clang-linker-wrapper] Re-use type returned from 'PointerType::getUnqual(C)' (NFC) (PR #73374)

2023-11-24 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/73374 Multiple calls to `PointerType::getUnqual(C)`, and calls to `Type::getPointerTo(AddrSpace=0)` on them all result in the same type. Clean them up to re-use the same `PtrTy` variable within function