1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[FileCheck] Fix comment in parseNumericVariableUse

Summary:
Comment explaining the interaction between parsing of numeric variable
definition and uses in parseNumericVariableUse is stale since it
suggests both use and definition parsing is done in the same function.
This was the case in a previous version of the patch committed as
71d3f227a790d6cf39d8c6267940e0dc0c237e11 but is no longer the case. This
patch updates the comment accordingly.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64227

llvm-svn: 365192
This commit is contained in:
Thomas Preud'homme 2019-07-05 12:01:12 +00:00
parent 0520d355f2
commit e7bb9ea3e0

View File

@ -151,12 +151,12 @@ FileCheckPattern::parseNumericVariableUse(StringRef &Expr,
return FileCheckErrorDiagnostic::get(
SM, Name, "invalid pseudo numeric variable '" + Name + "'");
// This method is indirectly called from parsePattern for all numeric
// variable definitions and uses in the order in which they appear in the
// CHECK pattern. For each definition, the pointer to the class instance of
// the corresponding numeric variable definition is stored in
// GlobalNumericVariableTable. Therefore, the pointer we get below is for the
// class instance corresponding to the last definition of this variable use.
// Numeric variable definitions and uses are parsed in the order in which
// they appear in the CHECK patterns. For each definition, the pointer to the
// class instance of the corresponding numeric variable definition is stored
// in GlobalNumericVariableTable in parsePattern. Therefore, the pointer we
// get below is for the class instance corresponding to the last definition
// of this variable use.
auto VarTableIter = Context->GlobalNumericVariableTable.find(Name);
if (VarTableIter == Context->GlobalNumericVariableTable.end())
return FileCheckErrorDiagnostic::get(