summaryrefslogtreecommitdiff
path: root/lib/Target/BPF
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2017-10-24 21:36:33 +0000
committerYonghong Song <yhs@fb.com>2017-10-24 21:36:33 +0000
commit2ea99a1a974384e82f6438b13de584a189dca32e (patch)
treee82cd11550c521c3c486b82988ad8eb056195122 /lib/Target/BPF
parent376cc58a7341a8d6817ce0d000b59ebb45d01d80 (diff)
bpf: fix an uninitialized variable issue
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
Diffstat (limited to 'lib/Target/BPF')
-rw-r--r--lib/Target/BPF/BPFISelDAGToDAG.cpp4
1 files changed, 3 insertions, 1 deletions
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";