From: Yonghong Song Date: Tue, 24 Oct 2017 21:36:33 +0000 (+0000) Subject: bpf: fix an uninitialized variable issue X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ea99a1a974384e82f6438b13de584a189dca32e;p=llvm bpf: fix an uninitialized variable issue Signed-off-by: Yonghong Song git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316519 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/BPF/BPFISelDAGToDAG.cpp b/lib/Target/BPF/BPFISelDAGToDAG.cpp index af9045ecf2a..1c12c23c931 100644 --- a/lib/Target/BPF/BPFISelDAGToDAG.cpp +++ b/lib/Target/BPF/BPFISelDAGToDAG.cpp @@ -40,7 +40,9 @@ namespace { class BPFDAGToDAGISel : public SelectionDAGISel { public: - explicit BPFDAGToDAGISel(BPFTargetMachine &TM) : SelectionDAGISel(TM) {} + explicit BPFDAGToDAGISel(BPFTargetMachine &TM) : SelectionDAGISel(TM) { + curr_func_ = nullptr; + } StringRef getPassName() const override { return "BPF DAG->DAG Pattern Instruction Selection";