Skip to content

Commit 66f533e

Browse files
[IR] Fix warnings (#143752)
This patch fixes: llvm/lib/IR/DIBuilder.cpp:1072:18: error: unused function 'getDeclareIntrin' [-Werror,-Wunused-function] llvm/include/llvm/IR/DIBuilder.h:51:15: error: private field 'DeclareFn' is not used [-Werror,-Wunused-private-field] llvm/include/llvm/IR/DIBuilder.h:52:15: error: private field 'ValueFn' is not used [-Werror,-Wunused-private-field] llvm/include/llvm/IR/DIBuilder.h:53:15: error: private field 'LabelFn' is not used [-Werror,-Wunused-private-field] llvm/include/llvm/IR/DIBuilder.h:54:15: error: private field 'AssignFn' is not used [-Werror,-Wunused-private-field]
1 parent 3e24dad commit 66f533e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

llvm/include/llvm/IR/DIBuilder.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ namespace llvm {
4747
Module &M;
4848
LLVMContext &VMContext;
4949

50-
DICompileUnit *CUNode; ///< The one compile unit created by this DIBuiler.
51-
Function *DeclareFn; ///< llvm.dbg.declare
52-
Function *ValueFn; ///< llvm.dbg.value
53-
Function *LabelFn; ///< llvm.dbg.label
54-
Function *AssignFn; ///< llvm.dbg.assign
50+
DICompileUnit *CUNode; ///< The one compile unit created by this DIBuiler.
5551

5652
SmallVector<TrackingMDNodeRef, 4> AllEnumTypes;
5753
/// Track the RetainTypes, since they can be updated later on.

llvm/lib/IR/DIBuilder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ using namespace llvm;
2525
using namespace llvm::dwarf;
2626

2727
DIBuilder::DIBuilder(Module &m, bool AllowUnresolvedNodes, DICompileUnit *CU)
28-
: M(m), VMContext(M.getContext()), CUNode(CU), DeclareFn(nullptr),
29-
ValueFn(nullptr), LabelFn(nullptr), AssignFn(nullptr),
28+
: M(m), VMContext(M.getContext()), CUNode(CU),
3029
AllowUnresolvedNodes(AllowUnresolvedNodes) {
3130
if (CUNode) {
3231
if (const auto &ETs = CUNode->getEnumTypes())

0 commit comments

Comments
 (0)