Skip to content

Commit 342a3ce

Browse files
committed
Move LLT::dump()'s impl to LowLevelType.cpp
Suggested by @jobnoorman https://reviews.llvm.org/D148767#4317848
1 parent 62cc657 commit 342a3ce

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

llvm/include/llvm/CodeGen/LowLevelType.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,7 @@ class LLT {
265265
void print(raw_ostream &OS) const;
266266

267267
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
268-
LLVM_DUMP_METHOD void dump() const {
269-
print(dbgs());
270-
dbgs() << '\n';
271-
}
268+
LLVM_DUMP_METHOD void dump() const;
272269
#endif
273270

274271
constexpr bool operator==(const LLT &RHS) const {

llvm/lib/CodeGen/LowLevelType.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ void LLT::print(raw_ostream &OS) const {
4747
OS << "LLT_invalid";
4848
}
4949

50+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
51+
LLVM_DUMP_METHOD void LLT::dump() const {
52+
print(dbgs());
53+
dbgs() << '\n';
54+
}
55+
#endif
56+
5057
const constexpr LLT::BitFieldInfo LLT::ScalarSizeFieldInfo;
5158
const constexpr LLT::BitFieldInfo LLT::PointerSizeFieldInfo;
5259
const constexpr LLT::BitFieldInfo LLT::PointerAddressSpaceFieldInfo;

0 commit comments

Comments
 (0)