mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-03 17:24:24 +00:00
FileCheck: Minor cleanup of the class Pattern
1. Add the "explicit" specifier to the single-argument constructor of Pattern 2. Reorder the fields to remove excessive padding (8 bytes). Patch by Alexander Shaposhnikov! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f222adf433
commit
4403f2ccc1
@ -100,8 +100,6 @@ namespace Check {
|
||||
class Pattern {
|
||||
SMLoc PatternLoc;
|
||||
|
||||
Check::CheckType CheckTy;
|
||||
|
||||
/// FixedStr - If non-empty, this pattern is a fixed string match with the
|
||||
/// specified fixed string.
|
||||
StringRef FixedStr;
|
||||
@ -109,9 +107,6 @@ class Pattern {
|
||||
/// RegEx - If non-empty, this is a regex pattern.
|
||||
std::string RegExStr;
|
||||
|
||||
/// \brief Contains the number of line this pattern is in.
|
||||
unsigned LineNumber;
|
||||
|
||||
/// VariableUses - Entries in this vector map to uses of a variable in the
|
||||
/// pattern, e.g. "foo[[bar]]baz". In this case, the RegExStr will contain
|
||||
/// "foobaz" and we'll get an entry in this vector that tells us to insert the
|
||||
@ -123,10 +118,13 @@ class Pattern {
|
||||
/// E.g. for the pattern "foo[[bar:.*]]baz", VariableDefs will map "bar" to 1.
|
||||
std::map<StringRef, unsigned> VariableDefs;
|
||||
|
||||
public:
|
||||
Check::CheckType CheckTy;
|
||||
|
||||
Pattern(Check::CheckType Ty)
|
||||
: CheckTy(Ty) { }
|
||||
/// \brief Contains the number of line this pattern is in.
|
||||
unsigned LineNumber;
|
||||
|
||||
public:
|
||||
explicit Pattern(Check::CheckType Ty) : CheckTy(Ty) {}
|
||||
|
||||
/// getLoc - Return the location in source code.
|
||||
SMLoc getLoc() const { return PatternLoc; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user