[llvm] 342a3ce - Move LLT::dump()'s impl to LowLevelType.cpp
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Thu May 4 05:30:40 PDT 2023
Author: NAKAMURA Takumi
Date: 2023-05-04T21:29:59+09:00
New Revision: 342a3ce27ef1e5460ca06c6deb855c9032448eca
URL: https://github.com/llvm/llvm-project/commit/342a3ce27ef1e5460ca06c6deb855c9032448eca
DIFF: https://github.com/llvm/llvm-project/commit/342a3ce27ef1e5460ca06c6deb855c9032448eca.diff
LOG: Move LLT::dump()'s impl to LowLevelType.cpp
Suggested by @jobnoorman
https://reviews.llvm.org/D148767#4317848
Added:
Modified:
llvm/include/llvm/CodeGen/LowLevelType.h
llvm/lib/CodeGen/LowLevelType.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/LowLevelType.h b/llvm/include/llvm/CodeGen/LowLevelType.h
index 8cf8a82369379..2924f475ac850 100644
--- a/llvm/include/llvm/CodeGen/LowLevelType.h
+++ b/llvm/include/llvm/CodeGen/LowLevelType.h
@@ -265,10 +265,7 @@ class LLT {
void print(raw_ostream &OS) const;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
- LLVM_DUMP_METHOD void dump() const {
- print(dbgs());
- dbgs() << '\n';
- }
+ LLVM_DUMP_METHOD void dump() const;
#endif
constexpr bool operator==(const LLT &RHS) const {
diff --git a/llvm/lib/CodeGen/LowLevelType.cpp b/llvm/lib/CodeGen/LowLevelType.cpp
index 916ebe297449b..24c30b756737b 100644
--- a/llvm/lib/CodeGen/LowLevelType.cpp
+++ b/llvm/lib/CodeGen/LowLevelType.cpp
@@ -47,6 +47,13 @@ void LLT::print(raw_ostream &OS) const {
OS << "LLT_invalid";
}
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+LLVM_DUMP_METHOD void LLT::dump() const {
+ print(dbgs());
+ dbgs() << '\n';
+}
+#endif
+
const constexpr LLT::BitFieldInfo LLT::ScalarSizeFieldInfo;
const constexpr LLT::BitFieldInfo LLT::PointerSizeFieldInfo;
const constexpr LLT::BitFieldInfo LLT::PointerAddressSpaceFieldInfo;
More information about the llvm-commits
mailing list