]> granicus.if.org Git - llvm/commitdiff
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>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316519 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/BPF/BPFISelDAGToDAG.cpp

index af9045ecf2a1095de92035696f4e77d140e50903..1c12c23c931284da904a98f875e65614658d027d 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";