From 90b9ef14251e67d65ce79a2217454b8a526002f9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 18 Sep 2020 17:23:46 -0700 Subject: [PATCH] [LiveDebugValues] Add `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` to suppress -Wunused-function --- lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp index e39811e33e8..5c05fbd6294 100644 --- a/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp +++ b/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp @@ -2905,6 +2905,7 @@ void InstrRefBasedLDV::vlocDataflow( BlocksToExplore.clear(); } +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) void InstrRefBasedLDV::dump_mloc_transfer( const MLocTransferMap &mloc_transfer) const { for (auto &P : mloc_transfer) { @@ -2913,6 +2914,7 @@ void InstrRefBasedLDV::dump_mloc_transfer( dbgs() << "Loc " << foo << " --> " << bar << "\n"; } } +#endif void InstrRefBasedLDV::emitLocations( MachineFunction &MF, LiveInsT SavedLiveIns, ValueIDNum **MInLocs,