From 8d4d72f16b180397914dfd9505ce691be349c11a Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 24 Feb 2017 14:53:35 +0000 Subject: [PATCH] Fix missing call to base class constructor in r296121. The 'Kind' member used in RTTI for InstructionPredicateMatcher was not initialized but went undetected since I always ended up with the correct value. llvm-svn: 296126 --- llvm/utils/TableGen/GlobalISelEmitter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp index fe799217bee4..37fa5738fdd7 100644 --- a/llvm/utils/TableGen/GlobalISelEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp @@ -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;