[PATCH] D154779: [NFC] make TypeInfer::MergeInTypeInfo const

Tomas Matheson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 01:12:37 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb25572137e4c: [NFC] make TypeInfer::MergeInTypeInfo const (authored by tmatheson).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154779/new/

https://reviews.llvm.org/D154779

Files:
  llvm/utils/TableGen/CodeGenDAGPatterns.cpp
  llvm/utils/TableGen/CodeGenDAGPatterns.h


Index: llvm/utils/TableGen/CodeGenDAGPatterns.h
===================================================================
--- llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ llvm/utils/TableGen/CodeGenDAGPatterns.h
@@ -272,11 +272,11 @@
   /// expand*) is to return "true" if a change has been made, "false"
   /// otherwise.
 
-  bool MergeInTypeInfo(TypeSetByHwMode &Out, const TypeSetByHwMode &In);
-  bool MergeInTypeInfo(TypeSetByHwMode &Out, MVT::SimpleValueType InVT) {
+  bool MergeInTypeInfo(TypeSetByHwMode &Out, const TypeSetByHwMode &In) const;
+  bool MergeInTypeInfo(TypeSetByHwMode &Out, MVT::SimpleValueType InVT) const {
     return MergeInTypeInfo(Out, TypeSetByHwMode(InVT));
   }
-  bool MergeInTypeInfo(TypeSetByHwMode &Out, ValueTypeByHwMode InVT) {
+  bool MergeInTypeInfo(TypeSetByHwMode &Out, ValueTypeByHwMode InVT) const {
     return MergeInTypeInfo(Out, TypeSetByHwMode(InVT));
   }
 
@@ -335,10 +335,11 @@
                        const TypeSetByHwMode::SetType &Legal);
 
   struct ValidateOnExit {
-    ValidateOnExit(TypeSetByHwMode &T, TypeInfer &TI) : Infer(TI), VTS(T) {}
+    ValidateOnExit(const TypeSetByHwMode &T, const TypeInfer &TI)
+        : Infer(TI), VTS(T) {}
     ~ValidateOnExit();
-    TypeInfer &Infer;
-    TypeSetByHwMode &VTS;
+    const TypeInfer &Infer;
+    const TypeSetByHwMode &VTS;
   };
 
   struct SuppressValidation {
Index: llvm/utils/TableGen/CodeGenDAGPatterns.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -366,7 +366,7 @@
 // --- TypeInfer
 
 bool TypeInfer::MergeInTypeInfo(TypeSetByHwMode &Out,
-                                const TypeSetByHwMode &In) {
+                                const TypeSetByHwMode &In) const {
   ValidateOnExit _1(Out, *this);
   In.validate();
   if (In.empty() || Out == In || TP.hasError())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154779.538405.patch
Type: text/x-patch
Size: 1910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230709/afa3b839/attachment.bin>


More information about the llvm-commits mailing list