[llvm] r296126 - Fix missing call to base class constructor in r296121.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 24 06:53:35 PST 2017
Author: dsanders
Date: Fri Feb 24 08:53:35 2017
New Revision: 296126
URL: http://llvm.org/viewvc/llvm-project?rev=296126&view=rev
Log:
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.
Modified:
llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
Modified: llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp?rev=296126&r1=296125&r2=296126&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp Fri Feb 24 08:53:35 2017
@@ -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;
More information about the llvm-commits
mailing list