diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:08 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:08 +0000 | 
| commit | c7dac04c3480f3c20487f912f77343139fce2d99 (patch) | |
| tree | 21a09bce0171e27bd1e92649db9df797fa097cea /utils/TableGen/CodeGenDAGPatterns.h | |
| parent | 044eb2f6afba375a914ac9d8024f8f5142bb912e (diff) | |
Notes
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
| -rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.h | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h index afbcb10a4b66..8a8132c7f894 100644 --- a/utils/TableGen/CodeGenDAGPatterns.h +++ b/utils/TableGen/CodeGenDAGPatterns.h @@ -18,6 +18,7 @@  #include "CodeGenHwModes.h"  #include "CodeGenIntrinsics.h"  #include "CodeGenTarget.h" +#include "SDNodeProperties.h"  #include "llvm/ADT/SmallVector.h"  #include "llvm/ADT/StringMap.h"  #include "llvm/ADT/StringSet.h" @@ -234,7 +235,7 @@ struct TypeSetByHwMode : public InfoByHwMode<MachineValueTypeSet> {    bool operator!=(const TypeSetByHwMode &VTS) const { return !(*this == VTS); }    void dump() const; -  void validate() const; +  bool validate() const;  private:    /// Intersect two sets. Return true if anything has changed. @@ -319,8 +320,13 @@ struct TypeInfer {                         const TypeSetByHwMode::SetType &Legal);    struct ValidateOnExit { -    ValidateOnExit(TypeSetByHwMode &T) : VTS(T) {} -    ~ValidateOnExit() { VTS.validate(); } +    ValidateOnExit(TypeSetByHwMode &T, TypeInfer &TI) : Infer(TI), VTS(T) {} +  #ifndef NDEBUG +    ~ValidateOnExit(); +  #else +    ~ValidateOnExit() {}  // Empty destructor with NDEBUG. +  #endif +    TypeInfer &Infer;      TypeSetByHwMode &VTS;    }; @@ -1204,6 +1210,7 @@ inline bool SDNodeInfo::ApplyTypeConstraints(TreePatternNode *N,        MadeChange |= TypeConstraints[i].ApplyTypeConstraint(N, *this, TP);      return MadeChange;    } +  } // end namespace llvm  #endif | 
