bpf: fix an uninitialized variable issue
authorYonghong Song <yhs@fb.com>
Tue, 24 Oct 2017 21:36:33 +0000 (21:36 +0000)
committerYonghong Song <yhs@fb.com>
Tue, 24 Oct 2017 21:36:33 +0000 (21:36 +0000)
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 316519

llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp

index af9045e..1c12c23 100644 (file)
@@ -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";