Author: Paul C. Anagnostopoulos
Date: 2021-01-08T13:21:57-05:00
New Revision: fe50b7363a1fbf974107d75a7d0a4be8b9481b56

URL: 
https://github.com/llvm/llvm-project/commit/fe50b7363a1fbf974107d75a7d0a4be8b9481b56
DIFF: 
https://github.com/llvm/llvm-project/commit/fe50b7363a1fbf974107d75a7d0a4be8b9481b56.diff

LOG: [TableGen] Fix use of *CurRec when CurRec is null.

I cannot build with the undefined sanitizer on Visual Studio.

Added: 
    

Modified: 
    llvm/lib/TableGen/TGParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index b0eecd5abdf5..7918e2ac98f6 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -3209,10 +3209,7 @@ bool TGParser::ParseAssert(MultiClass *CurMultiClass, 
Record *CurRec) {
   } else if (CurRec) {
     CurRec->addAssertion(ConditionLoc, Condition, Message);
   } else { // at top level
-    RecordResolver R(*CurRec);
-    Init *Value = Condition->resolveReferences(R);
-    Init *Text = Message->resolveReferences(R);
-    CheckAssert(ConditionLoc, Value, Text);
+    CheckAssert(ConditionLoc, Condition, Message);
   }
  
   return false;


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to