[llvm] Reapply [IR] Lazily initialize the class to pass name mapping (NFC) (#96321) (PR #96462)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 03:59:56 PDT 2024
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 e5a41f0afc152cc24b8fef3aa177ef53b2e77c43 d79d79234f0600d6169c216aae1011170508a1e4 --extensions 'inc,cpp,h' -- llvm/include/llvm/IR/PassInstrumentation.h llvm/include/llvm/Passes/TargetPassRegistry.inc llvm/include/llvm/Target/TargetMachine.h llvm/lib/IR/PassInstrumentation.cpp llvm/lib/Passes/PassBuilder.cpp llvm/lib/Target/AArch64/AArch64TargetMachine.cpp llvm/lib/Target/AArch64/AArch64TargetMachine.h llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h llvm/lib/Target/BPF/BPFTargetMachine.cpp llvm/lib/Target/BPF/BPFTargetMachine.h llvm/lib/Target/DirectX/DirectXTargetMachine.cpp llvm/lib/Target/DirectX/DirectXTargetMachine.h llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp llvm/lib/Target/Hexagon/HexagonTargetMachine.h llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp llvm/lib/Target/NVPTX/NVPTXTargetMachine.h llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp llvm/lib/Target/X86/X86TargetMachine.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index b36cc29257..c19d5a79cc 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -410,7 +410,7 @@ PassBuilder::PassBuilder(TargetMachine *TM, PipelineTuningOptions PTO,
PIC->registerClassToPassNameCallback([this, PIC]() {
// MSVC requires this to be captured if it's used inside decltype.
// Other compilers consider it an unused lambda capture.
- (void) this;
+ (void)this;
#define MODULE_PASS(NAME, CREATE_PASS) \
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
#define MODULE_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS) \
``````````
</details>
https://github.com/llvm/llvm-project/pull/96462
More information about the llvm-commits
mailing list