|
LLVM
10.0.0
|
#include "llvm/Support/FileCheck.h"#include "FileCheckImpl.h"#include "llvm/ADT/StringSet.h"#include "llvm/ADT/Twine.h"#include "llvm/Support/FormatVariadic.h"#include <cstdint>#include <list>#include <tuple>#include <utility>Go to the source code of this file.
Functions | |
| static char | popFront (StringRef &S) |
| static uint64_t | add (uint64_t LeftOp, uint64_t RightOp) |
| static uint64_t | sub (uint64_t LeftOp, uint64_t RightOp) |
| static SMRange | ProcessMatchResult (FileCheckDiag::MatchType MatchTy, const SourceMgr &SM, SMLoc Loc, Check::FileCheckType CheckTy, StringRef Buffer, size_t Pos, size_t Len, std::vector< FileCheckDiag > *Diags, bool AdjustPrevDiag=false) |
| static bool | IsPartOfWord (char c) |
| static std::pair< Check::FileCheckType, StringRef > | FindCheckType (StringRef Buffer, StringRef Prefix) |
| static size_t | SkipWord (StringRef Str, size_t Loc) |
| static std::pair< StringRef, StringRef > | FindFirstMatchingPrefix (Regex &PrefixRE, StringRef &Buffer, unsigned &LineNumber, Check::FileCheckType &CheckTy) |
| Searches the buffer for the first prefix in the prefix regular expression. More... | |
| static void | PrintMatch (bool ExpectedMatch, const SourceMgr &SM, StringRef Prefix, SMLoc Loc, const Pattern &Pat, int MatchedCount, StringRef Buffer, size_t MatchPos, size_t MatchLen, const FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) |
| static void | PrintMatch (bool ExpectedMatch, const SourceMgr &SM, const FileCheckString &CheckStr, int MatchedCount, StringRef Buffer, size_t MatchPos, size_t MatchLen, FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) |
| static void | PrintNoMatch (bool ExpectedMatch, const SourceMgr &SM, StringRef Prefix, SMLoc Loc, const Pattern &Pat, int MatchedCount, StringRef Buffer, bool VerboseVerbose, std::vector< FileCheckDiag > *Diags, Error MatchErrors) |
| static void | PrintNoMatch (bool ExpectedMatch, const SourceMgr &SM, const FileCheckString &CheckStr, int MatchedCount, StringRef Buffer, bool VerboseVerbose, std::vector< FileCheckDiag > *Diags, Error MatchErrors) |
| static unsigned | CountNumNewlinesBetween (StringRef Range, const char *&FirstNewLine) |
| Counts the number of newlines in the specified range. More... | |
| static bool | ValidateCheckPrefix (StringRef CheckPrefix) |
Variables | |
| constexpr StringLiteral | SpaceChars = " \t" |
|
static |
Definition at line 208 of file FileCheck.cpp.
Referenced by llvm::APInt::abs(), llvm::AliasSetTracker::add(), llvm::AliasSetTracker::addAllInstructionsInLoopUsingMSSA(), llvm::BlockFrequencyInfoImplBase::Distribution::addBackedge(), addExclusiveRegPair(), llvm::BlockFrequencyInfoImplBase::Distribution::addExit(), llvm::BlockFrequencyInfoImplBase::Distribution::addLocal(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), buildMUBUFOffsetLoadStore(), llvm::FunctionComparator::compare(), ContainsReg(), llvm::SIInstrInfo::convertNonUniformIfRegion(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::SIInstrInfo::convertToThreeAddress(), llvm::Thumb1InstrInfo::copyPhysReg(), createPHIsForSelects(), llvm::orc::CtorDtorRunner::CtorDtorRunner(), DecodeAddrModeImm12Operand(), DecodePostIdxReg(), DecodeT2LoadImm8(), llvm::ModuleSummaryIndex::dumpSCCs(), emitIndirectDst(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), emitPostLd(), emitPostSt(), llvm::ARMFrameLowering::emitPrologue(), emitThumbRegPlusImmInReg(), emitXBegin(), llvm::InstructionSelector::executeMatchTable(), llvm::HexagonInstrInfo::expandPostRAPseudo(), llvm::SIInstrInfo::expandPostRAPseudo(), llvm::HexagonInstrInfo::expandVGatherPseudo(), llvm::LegalizeRuleSet::fallback(), findPotentialBlockers(), findTemporariesForLR(), foldVGPRCopyIntoRegSequence(), for(), forceReg(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), genNeg(), getAdjustedCmp(), getBufferFormatWithCompCount(), llvm::orc::IRLayer::getCloneToNewContextOnEmit(), getCmpForPseudo(), getCompareSourceReg(), getDSShaderTypeValue(), llvm::orc::ObjectLayer::getExecutionSession(), llvm::coverage::CounterExpressionBuilder::getExpressions(), getGeneralPermuteNode(), getINCDECFromLEA(), getLogicalBitOpcode(), getLSMultipleTransferSize(), getPostIndexedLoadStoreOpcode(), llvm::SCEVUnionPredicate::getPredicates(), llvm::detail::DoubleAPFloat::getSecond(), getUnconditionalBrDisp(), getV_CMPOpcode(), hasUsesOutsideLoop(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), InsertLDR_STR(), isAlwaysFoldable(), llvm::ARMBaseInstrInfo::isLoadFromStackSlotPostFE(), isMergeableLdStUpdate(), llvm::sampleprof::ProfileSymbolList::merge(), MSA2OpIntrinsicToGeneric(), MSA3OpIntrinsicToGeneric(), llvm::detail::IEEEFloat::needsCleanup(), llvm::PMDataManager::PMDataManager(), llvm::PPCInstrInfo::PredicateInstruction(), llvm::bfi_detail::BlockMass::print(), llvm::sampleprof::ProfileSymbolList::read(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), SelectMSA3OpIntrinsic(), setM0ToIndexFromSGPR(), llvm::Thumb1FrameLowering::spillCalleeSavedRegisters(), sub(), llvm::orc::SymbolLookupSet::SymbolLookupSet(), tieOpsIfNeeded(), tryToFindRegisterToRename(), tryToFoldACImm(), llvm::HexagonBlockRanges::RangeList::unionize(), updateDefinedRegisters(), VerifyLowRegs(), llvm::AliasSetTracker::~AliasSetTracker(), and llvm::LiveRangeUpdater::~LiveRangeUpdater().
Counts the number of newlines in the specified range.
Definition at line 1388 of file FileCheck.cpp.
References llvm::StringRef::begin(), llvm::StringRef::empty(), llvm::StringRef::find_first_of(), llvm::StringRef::size(), and llvm::StringRef::substr().
Referenced by llvm::FileCheckString::CheckNext(), and llvm::FileCheckString::CheckSame().
|
static |
Definition at line 973 of file FileCheck.cpp.
References llvm::Check::CheckBadCount, llvm::Check::CheckBadNot, llvm::Check::CheckDAG, llvm::Check::CheckEmpty, llvm::Check::CheckLabel, llvm::Check::CheckNext, llvm::Check::CheckNone, llvm::Check::CheckNot, llvm::Check::CheckPlain, llvm::Check::CheckSame, llvm::StringRef::drop_front(), llvm::Check::FileCheckType::setCount(), and llvm::StringRef::size().
Referenced by FindFirstMatchingPrefix().
|
static |
Searches the buffer for the first prefix in the prefix regular expression.
This searches the buffer using the provided regular expression, however it enforces constraints beyond that: 1) The found prefix must not be a suffix of something that looks like a valid prefix. 2) The found prefix must be followed by a valid check type suffix using FindCheckType above.
If this routine returns a valid prefix, it will also shrink Buffer to start at the beginning of the returned prefix, increment LineNumber for each new line consumed from Buffer, and set CheckTy to the type of check found by examining the suffix.
If no valid prefix is found, the state of Buffer, LineNumber, and CheckTy is unspecified.
Definition at line 1058 of file FileCheck.cpp.
References assert(), llvm::StringRef::back(), llvm::Check::CheckNone, llvm::SmallVectorImpl< T >::clear(), llvm::StringRef::count(), llvm::StringRef::data(), llvm::StringRef::drop_front(), llvm::StringRef::empty(), FindCheckType(), IsPartOfWord(), llvm::Regex::match(), llvm::cl::Prefix, llvm::StringRef::size(), SkipWord(), and llvm::StringRef::substr().
Referenced by llvm::FileCheck::readCheckFile().
Definition at line 930 of file FileCheck.cpp.
Referenced by FindFirstMatchingPrefix(), and SkipWord().
Definition at line 104 of file FileCheck.cpp.
References llvm::SystemZICMP::Any, C, llvm::consumeError(), llvm::StringRef::consumeInteger(), Context, llvm::StringRef::drop_front(), llvm::StringRef::empty(), llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringRef::equals(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::StringRef::front(), llvm::ErrorDiagnostic::get(), llvm::NumericVariable::getDefLineNumber(), llvm::UndefVarError::ID, llvm::ErrorDiagnostic::ID, llvm::NotFoundError::ID, llvm::StringRef::ltrim(), SpaceChars, and llvm::Expected< T >::takeError().
Referenced by sub().
|
static |
Definition at line 1274 of file FileCheck.cpp.
References llvm::Check::CheckEOF, llvm::SourceMgr::DK_Error, llvm::SourceMgr::DK_Note, llvm::SourceMgr::DK_Remark, llvm::formatv(), llvm::Pattern::getCheckTy(), llvm::Pattern::getCount(), llvm::Check::FileCheckType::getDescription(), llvm::FileCheckDiag::MatchFoundAndExpected, llvm::FileCheckDiag::MatchFoundButExcluded, llvm::SourceMgr::PrintMessage(), llvm::Pattern::printSubstitutions(), ProcessMatchResult(), llvm::SMRange::Start, llvm::FileCheckRequest::Verbose, and llvm::FileCheckRequest::VerboseVerbose.
Referenced by llvm::FileCheckString::Check(), llvm::FileCheckString::CheckNot(), and PrintMatch().
|
static |
Definition at line 1311 of file FileCheck.cpp.
References llvm::FileCheckString::Loc, llvm::FileCheckString::Pat, llvm::FileCheckString::Prefix, and PrintMatch().
|
static |
Definition at line 1320 of file FileCheck.cpp.
References assert(), llvm::consumeError(), llvm::SourceMgr::DK_Error, llvm::SourceMgr::DK_Note, llvm::SourceMgr::DK_Remark, E, llvm::errs(), llvm::StringRef::find_first_not_of(), llvm::formatv(), llvm::Pattern::getCheckTy(), llvm::Pattern::getCount(), llvm::Check::FileCheckType::getDescription(), llvm::handleErrors(), llvm::ErrorDiagnostic::log(), llvm::FileCheckDiag::MatchNoneAndExcluded, llvm::FileCheckDiag::MatchNoneButExpected, llvm::Pattern::printFuzzyMatch(), llvm::SourceMgr::PrintMessage(), llvm::Pattern::printSubstitutions(), ProcessMatchResult(), llvm::StringRef::size(), llvm::SMRange::Start, and llvm::StringRef::substr().
Referenced by llvm::FileCheckString::Check(), llvm::FileCheckString::CheckNot(), and PrintNoMatch().
|
static |
Definition at line 1378 of file FileCheck.cpp.
References llvm::FileCheckString::Loc, llvm::FileCheckString::Pat, llvm::FileCheckString::Prefix, and PrintNoMatch().
|
static |
Definition at line 752 of file FileCheck.cpp.
Referenced by llvm::FileCheckString::Check(), llvm::Pattern::printFuzzyMatch(), PrintMatch(), and PrintNoMatch().
|
static |
Definition at line 1028 of file FileCheck.cpp.
References IsPartOfWord(), and llvm::StringRef::size().
Referenced by FindFirstMatchingPrefix().
|
static |
Definition at line 212 of file FileCheck.cpp.
References add(), llvm::SystemZICMP::Any, llvm::StringRef::data(), llvm::StringRef::empty(), llvm::ErrorDiagnostic::get(), llvm::SMLoc::getFromPointer(), llvm::Literal, llvm::StringRef::ltrim(), popFront(), and SpaceChars.
Referenced by copyHint().
Definition at line 1710 of file FileCheck.cpp.
References llvm::Regex::match().
Referenced by llvm::FileCheck::ValidateCheckPrefixes().
| constexpr StringLiteral SpaceChars = " \t" |
Definition at line 101 of file FileCheck.cpp.
Referenced by llvm::Pattern::parseNumericSubstitutionBlock(), popFront(), and sub().
1.8.13