]> granicus.if.org Git - llvm/commitdiff
Fix missing call to base class constructor in r296121.
authorDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 24 Feb 2017 14:53:35 +0000 (14:53 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 24 Feb 2017 14:53:35 +0000 (14:53 +0000)
The 'Kind' member used in RTTI for InstructionPredicateMatcher was not
initialized but went undetected since I always ended up with the correct value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296126 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/GlobalISelEmitter.cpp

index fe799217bee4c80940e9a103be6906dbbcb8cf6b..37fa5738fdd757aee18ec40af3d9a1dfe5f3c46e 100644 (file)
@@ -277,6 +277,7 @@ protected:
   PredicateKind Kind;
 
 public:
+  InstructionPredicateMatcher(PredicateKind Kind) : Kind(Kind) {}
   virtual ~InstructionPredicateMatcher() {}
 
   PredicateKind getKind() const { return Kind; }
@@ -300,7 +301,8 @@ protected:
   const CodeGenInstruction *I;
 
 public:
-  InstructionOpcodeMatcher(const CodeGenInstruction *I) : I(I) {}
+  InstructionOpcodeMatcher(const CodeGenInstruction *I)
+      : InstructionPredicateMatcher(IPM_Opcode), I(I) {}
 
   static bool classof(const InstructionPredicateMatcher *P) {
     return P->getKind() == IPM_Opcode;