summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h
index e4523797edf..c682f3d3268 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h
@@ -333,9 +333,21 @@ struct TypeInfer {
TypeSetByHwMode &VTS;
};
+ struct SuppressValidation {
+ SuppressValidation(TypeInfer &TI) : Infer(TI), SavedValidate(TI.Validate) {
+ Infer.Validate = false;
+ }
+ ~SuppressValidation() {
+ Infer.Validate = SavedValidate;
+ }
+ TypeInfer &Infer;
+ bool SavedValidate;
+ };
+
TreePattern &TP;
unsigned ForceMode; // Mode to use when set.
bool CodeGen = false; // Set during generation of matcher code.
+ bool Validate = true; // Indicate whether to validate types.
private:
TypeSetByHwMode getLegalTypes();
OpenPOWER on IntegriCloud