[llvm] [Support] Use an inherited constructor in DOTGraphTraits (NFC) (PR #164056)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 17 23:54:59 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
This patch simplifies DOTGraphTraits with an inherited constructor.
This way, we do not need to repeat the constructor signature or
manually forward constructor arguments.
---
Full diff: https://github.com/llvm/llvm-project/pull/164056.diff
1 Files Affected:
- (modified) llvm/include/llvm/Support/DOTGraphTraits.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/Support/DOTGraphTraits.h b/llvm/include/llvm/Support/DOTGraphTraits.h
index ffa9abe328c83..bf30aa4df9fab 100644
--- a/llvm/include/llvm/Support/DOTGraphTraits.h
+++ b/llvm/include/llvm/Support/DOTGraphTraits.h
@@ -164,7 +164,7 @@ struct DefaultDOTGraphTraits {
///
template <typename Ty>
struct DOTGraphTraits : public DefaultDOTGraphTraits {
- DOTGraphTraits (bool simple=false) : DefaultDOTGraphTraits (simple) {}
+ using DefaultDOTGraphTraits::DefaultDOTGraphTraits;
};
} // End llvm namespace
``````````
</details>
https://github.com/llvm/llvm-project/pull/164056
More information about the llvm-commits
mailing list