LLVM  8.0.1
Classes | Macros | Functions | Variables
regcomp.c File Reference
#include <sys/types.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <stdlib.h>
#include "regex_impl.h"
#include "regutils.h"
#include "regex2.h"
#include "llvm/Config/config.h"
Include dependency graph for regcomp.c:

Go to the source code of this file.

Classes

struct  cclass
 
struct  cname
 
struct  parse
 

Macros

#define NPAREN   10 /* we need to remember () 1-9 for back refs */
 
#define PEEK()   (*p->next)
 
#define PEEK2()   (*(p->next+1))
 
#define MORE()   (p->next < p->end)
 
#define MORE2()   (p->next+1 < p->end)
 
#define SEE(c)   (MORE() && PEEK() == (c))
 
#define SEETWO(a, b)   (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
 
#define EAT(c)   ((SEE(c)) ? (NEXT(), 1) : 0)
 
#define EATTWO(a, b)   ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
 
#define NEXT()   (p->next++)
 
#define NEXT2()   (p->next += 2)
 
#define NEXTn(n)   (p->next += (n))
 
#define GETNEXT()   (*p->next++)
 
#define SETERROR(e)   seterr(p, (e))
 
#define REQUIRE(co, e)   (void)((co) || SETERROR(e))
 
#define MUSTSEE(c, e)   (REQUIRE(MORE() && PEEK() == (c), e))
 
#define MUSTEAT(c, e)   (REQUIRE(MORE() && GETNEXT() == (c), e))
 
#define MUSTNOTSEE(c, e)   (REQUIRE(!MORE() || PEEK() != (c), e))
 
#define EMIT(op, sopnd)   doemit(p, (sop)(op), (size_t)(sopnd))
 
#define INSERT(op, pos)   doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
 
#define AHEAD(pos)   dofwd(p, pos, HERE()-(pos))
 
#define ASTERN(sop, pos)   EMIT(sop, HERE()-pos)
 
#define HERE()   (p->slen)
 
#define THERE()   (p->slen - 1)
 
#define THERETHERE()   (p->slen - 2)
 
#define DROP(n)   (p->slen -= (n))
 
#define DUPMAX   255
 
#define INFINITY   (DUPMAX + 1)
 
#define never   0 /* some <assert.h>s have bugs too */
 
#define GOODFLAGS(f)   ((f)&~REG_DUMP)
 
#define BACKSL   (1<<CHAR_BIT)
 
#define N   2
 
#define INF   3
 
#define REP(f, t)   ((f)*8 + (t))
 
#define MAP(n)   (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
 

Functions

static void p_ere (struct parse *, int)
 
static void p_ere_exp (struct parse *)
 
static void p_str (struct parse *)
 
static void p_bre (struct parse *, int, int)
 
static int p_simp_re (struct parse *, int)
 
static int p_count (struct parse *)
 
static void p_bracket (struct parse *)
 
static void p_b_term (struct parse *, cset *)
 
static void p_b_cclass (struct parse *, cset *)
 
static void p_b_eclass (struct parse *, cset *)
 
static char p_b_symbol (struct parse *)
 
static char p_b_coll_elem (struct parse *, int)
 
static char othercase (int)
 
static void bothcases (struct parse *, int)
 
static void ordinary (struct parse *, int)
 
static void nonnewline (struct parse *)
 
static void repeat (struct parse *, sopno, int, int)
 
static int seterr (struct parse *, int)
 
static csetallocset (struct parse *)
 
static void freeset (struct parse *, cset *)
 
static int freezeset (struct parse *, cset *)
 
static int firstch (struct parse *, cset *)
 
static int nch (struct parse *, cset *)
 
static void mcadd (struct parse *, cset *, const char *)
 
static void mcinvert (struct parse *, cset *)
 
static void mccase (struct parse *, cset *)
 
static int isinsets (struct re_guts *, int)
 
static int samesets (struct re_guts *, int, int)
 
static void categorize (struct parse *, struct re_guts *)
 
static sopno dupl (struct parse *, sopno, sopno)
 
static void doemit (struct parse *, sop, size_t)
 
static void doinsert (struct parse *, sop, size_t, sopno)
 
static void dofwd (struct parse *, sopno, sop)
 
static void enlarge (struct parse *, sopno)
 
static void stripsnug (struct parse *, struct re_guts *)
 
static void findmust (struct parse *, struct re_guts *)
 
static sopno pluscount (struct parse *, struct re_guts *)
 
int llvm_regcomp (llvm_regex_t *preg, const char *pattern, int cflags)
 

Variables

static struct cclass cclasses []
 
static struct cname cnames []
 
static char nuls [10]
 

Macro Definition Documentation

◆ AHEAD

#define AHEAD (   pos)    dofwd(p, pos, HERE()-(pos))

Definition at line 268 of file regcomp.c.

Referenced by p_ere(), p_ere_exp(), and repeat().

◆ ASTERN

#define ASTERN (   sop,
  pos 
)    EMIT(sop, HERE()-pos)

Definition at line 269 of file regcomp.c.

Referenced by p_ere(), p_ere_exp(), p_simp_re(), and repeat().

◆ BACKSL

#define BACKSL   (1<<CHAR_BIT)

Referenced by p_simp_re().

◆ DROP

#define DROP (   n)    (p->slen -= (n))

Definition at line 273 of file regcomp.c.

Referenced by p_bre(), and repeat().

◆ DUPMAX

#define DUPMAX   255

Definition at line 278 of file regcomp.c.

Referenced by p_count().

◆ EAT

#define EAT (   c)    ((SEE(c)) ? (NEXT(), 1) : 0)

Definition at line 255 of file regcomp.c.

Referenced by p_b_term(), p_bracket(), p_bre(), p_ere(), p_ere_exp(), and p_simp_re().

◆ EATTWO

#define EATTWO (   a,
 
)    ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)

Definition at line 256 of file regcomp.c.

Referenced by p_b_symbol(), p_b_term(), and p_simp_re().

◆ EMIT

#define EMIT (   op,
  sopnd 
)    doemit(p, (sop)(op), (size_t)(sopnd))

◆ GETNEXT

#define GETNEXT ( )    (*p->next++)

Definition at line 260 of file regcomp.c.

Referenced by p_b_symbol(), p_count(), p_ere_exp(), p_simp_re(), and p_str().

◆ GOODFLAGS

#define GOODFLAGS (   f)    ((f)&~REG_DUMP)

Referenced by llvm_regcomp().

◆ HERE

#define HERE ( )    (p->slen)

Definition at line 270 of file regcomp.c.

Referenced by doinsert(), dupl(), p_bre(), p_ere(), p_ere_exp(), p_simp_re(), and repeat().

◆ INF

#define INF   3

Referenced by repeat().

◆ INFINITY

#define INFINITY   (DUPMAX + 1)

Definition at line 280 of file regcomp.c.

Referenced by p_ere_exp(), p_simp_re(), and false::LibCallsShrinkWrap::perform().

◆ INSERT

#define INSERT (   op,
  pos 
)    doinsert(p, (sop)(op), HERE()-(pos)+1, pos)

Definition at line 267 of file regcomp.c.

Referenced by p_ere(), p_ere_exp(), p_simp_re(), and repeat().

◆ MAP

#define MAP (   n)    (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)

Referenced by repeat().

◆ MORE

#define MORE ( )    (p->next < p->end)

◆ MORE2

#define MORE2 ( )    (p->next+1 < p->end)

Definition at line 252 of file regcomp.c.

Referenced by p_b_term(), and p_ere_exp().

◆ MUSTEAT

#define MUSTEAT (   c,
 
)    (REQUIRE(MORE() && GETNEXT() == (c), e))

Definition at line 264 of file regcomp.c.

Referenced by p_bracket(), and p_ere_exp().

◆ MUSTNOTSEE

#define MUSTNOTSEE (   c,
 
)    (REQUIRE(!MORE() || PEEK() != (c), e))

Definition at line 265 of file regcomp.c.

◆ MUSTSEE

#define MUSTSEE (   c,
 
)    (REQUIRE(MORE() && PEEK() == (c), e))

Definition at line 263 of file regcomp.c.

◆ N

#define N   2
Examples:
/home/cs6340/llvm-8.0.1.src/include/llvm/ADT/ilist_node.h.

Referenced by llvm::MachineFunction::addCatchTypeInfo(), llvm::GCOVBlock::addCount(), llvm::DwarfExpression::addExpression(), llvm::LiveIntervals::addKillFlags(), llvm::DwarfExpression::addMachineRegExpression(), addNegOperand(), AddNodeIDCustom(), llvm::SUnit::addPred(), llvm::rdf::DataFlowGraph::addr(), llvm::InstrProfRecord::addValueData(), adjustColumn(), adjustForFNeg(), adjustForLTGFR(), adjustForSubtraction(), llvm::IntervalMapImpl::NodeBase< std::pair< KeyT, KeyT >, ValT, N >::adjustFromLeftSib(), areCFlagsAliveInSuccessors(), llvm::DiagnosticInfoOptimizationBase::Argument::Argument(), llvm::array_lengthof(), llvm::ms_demangle::ArrayTypeNode::ArrayTypeNode(), llvm::AVRDAGToDAGISel::select< AVRISD::CALL >(), llvm::AVRDAGToDAGISel::select< ISD::BRIND >(), llvm::AVRDAGToDAGISel::select< ISD::FrameIndex >(), llvm::AVRDAGToDAGISel::select< ISD::LOAD >(), llvm::AVRDAGToDAGISel::select< ISD::STORE >(), llvm::AVRTargetLowering::AVRTargetLowering(), llvm::LazyCallGraph::buildRefSCCs(), llvm::APInt::byteSwap(), llvm::LiveRangeCalc::calculateValues(), canFoldInAddressingMode(), canFoldIVIncExpr(), canLowerToLDG(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canonicalizeMetadataForValue(), llvm::FoldingSetBase::capacity(), CheckCondCode(), CheckInteger(), checkOverlappingElement(), CheckValueType(), llvm::TypeFinder::clear(), llvm::PressureDiffs::clear(), llvm::RegionBase< RegionTraits< Function > >::clearNodeCache(), CloneNodeWithValues(), cloneOrBuildODR(), llvm::rdf::DeadCodeElimination::collect(), llvm::GCOVBlock::collectLineCounts(), CollectOpsToWiden(), CombineBaseUpdate(), combineLoad(), combineLoadToNewType(), combineLogicBlendIntoPBLENDV(), combineMaskedLoad(), combineMaskedStore(), combineMul(), combineOrCmpEqZeroToCtlzSrl(), combineShuffle(), combineShuffleOfConcatUndef(), combineShuffleToFMAddSub(), combineStore(), combineStoreToNewValue(), llvm::TargetLowering::TargetLoweringOpt::CombineTo(), combineToExtendVectorInReg(), llvm::DomTreeNodeBase< VPBlockBase >::compare(), llvm::MDNodeOpsKey::compareOps(), llvm::ScaledNumber< uint64_t >::compareTo(), llvm::BTFTypeFuncProto::completeType(), llvm::HexagonDAGToDAGISel::ComplexPatternFuncMutatesDAG(), llvm::WasmException::computeCallSiteTable(), computeDomSubtreeCost(), llvm::ScheduleDAGSDNodes::computeLatency(), computeLiveOuts(), llvm::EHStreamer::computePadMap(), llvm::MachineBasicBlock::computeRegisterLiveness(), llvm::object::computeSymbolSizes(), ConstantFold(), constructRetValue(), llvm::DwarfUnit::constructSubprogramArguments(), llvm::codeview::consume(), llvm::codeview::consume_numeric(), ConvertSelectToConcatVector(), llvm::IntervalMapImpl::NodeBase< std::pair< KeyT, KeyT >, ValT, N >::copy(), llvm::StringRef::count(), llvm::Function::Create(), llvm::IRBuilder< TargetFolder >::CreateAggregateRet(), llvm::createARCISelDag(), llvm::DIBuilder::createGlobalVariableExpression(), createIrreducibleLoop(), createMMXBuildVector(), llvm::createMSP430ISelDag(), llvm::createObjCARCContractPass(), llvm::createPGOFuncNameMetadata(), llvm::createR600ISelDag(), llvm::createXCoreISelDag(), llvm::VerifierSupport::DebugInfoCheckFailed(), llvm::AArch64_AM::decodeLogicalImmediate(), decodePCDBLOperand(), llvm::SelectionDAG::DeleteNode(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::DeleteUnreachable(), llvm::DelimitedScope< Open, Close >::DelimitedScope(), llvm::HexagonDAGToDAGISel::DetectUseSxtw(), llvm::DiagnosticPrinterRawOStream::DiagnosticPrinterRawOStream(), llvm::DIBuilder::DIBuilder(), llvm::BinaryStreamRefBase< WritableBinaryStreamRef, WritableBinaryStream >::drop_back(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::drop_back(), llvm::MutableArrayRef< BitWord >::drop_back(), llvm::StringRef::drop_back(), llvm::BinaryStreamRefBase< WritableBinaryStreamRef, WritableBinaryStream >::drop_front(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::drop_front(), llvm::MutableArrayRef< BitWord >::drop_front(), llvm::StringRef::drop_front(), StringView::dropBack(), StringView::dropFront(), llvm::LexicalScope::dump(), llvm::GVNExpression::Expression::dump(), llvm::itanium_demangle::Node::dump(), llvm::ScheduleDAGSDNodes::dumpNode(), llvm::SDValue::dumpr(), llvm::DIEAbbrev::Emit(), llvm::EHStreamer::emitExceptionTable(), llvm::emitFReadUnlocked(), llvm::emitFWriteUnlocked(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::InstrProfRecordWriterTrait::EmitKey(), llvm::InstrProfRecordWriterTrait::EmitKeyDataLength(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::MipsMCCodeEmitter::encodeInstruction(), llvm::BaseIndexOffset::equalBaseIndex(), llvm::rdf::DeadCodeElimination::erase(), llvm::SmallVectorImpl< std::pair< llvm::RelocationValueRef, llvm::RelocationEntry > >::erase(), eraseGPOpnd(), llvm::HexagonEvaluator::evaluate(), expandDisp(), llvm::TargetLowering::expandMUL(), llvm::HexagonBlockRanges::expandToSubRegs(), llvm::PPCTargetLowering::expandVSXLoadForLE(), llvm::PPCTargetLowering::expandVSXStoreForLE(), extractMDNode(), llvm::SourceMgr::FindBufferContainingLoc(), FindCallSeqStart(), findExecCopy(), llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::findFrom(), llvm::IntervalMapImpl::BranchNode< KeyT, ValT, RootBranchCap, Traits >::findFrom(), findGluedUser(), findNonImmUse(), findPartitions(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::FindRoots(), foldBitcastedFPLogic(), FoldCondBranchOnPHI(), foldMaskedShiftToBEXTR(), foldShuffleOfHorizOp(), foldSignedTruncationCheck(), foldUDivShl(), foldVGPRCopyIntoRegSequence(), llvm::codeview::TypeCollection::ForEachRecord(), forEachUser(), llvm::format_provider< T, typename std::enable_if< detail::use_string_formatter< T >::value >::type >::format(), llvm::PPCTargetLowering::functionArgumentNeedsConsecutiveRegisters(), FunctionNumber(), GeneratePerfectShuffle(), llvm::cl::generic_parser_base::generic_parser_base(), llvm::ArrayRecycler< T, Align >::Capacity::get(), llvm::DITypeRefArray::get(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::ChildrenGetter< Inverse >::Get(), llvm::ScaledNumber< uint64_t >::get(), llvm::LazyCallGraph::get(), llvm::MDTupleTypedArrayWrapper< T >::get(), getAL(), llvm::HexagonFrameLowering::getAlignaInstr(), llvm::Instruction::getAllMetadataOtherThanDebugLoc(), getAsNonOpaqueConstant(), llvm::MachineFunction::getBlockNumbered(), llvm::RuntimePointerChecking::getChecks(), llvm::AVRTargetLowering::getCmpLibcallReturnType(), llvm::SCEVPredicate::getComplexity(), llvm::SelectionDAG::getCondCode(), getConstantValue(), llvm::legacy::FunctionPassManagerImpl::getContainedManager(), llvm::legacy::PassManagerImpl::getContainedManager(), llvm::RGPassManager::getContainedPass(), llvm::LPPassManager::getContainedPass(), llvm::FPPassManager::getContainedPass(), llvm::LLParser::getContext(), getContiguousRangeOfSetBits(), llvm::SelectionDAG::getCopyToReg(), llvm::DominatorTreeBase< BasicBlock, false >::getDescendants(), llvm::cl::parser< const PassInfo *>::getDescription(), llvm::DwarfUnit::getDIELoc(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::StructType::getElementType(), getEncodedIntegerLength(), llvm::DomTreeGraphTraitsBase< const VPDomTreeNode, VPDomTreeNode::const_iterator >::getEntryNode(), llvm::MachineDomTreeGraphTraitsBase< const MachineDomTreeNode, MachineDomTreeNode::const_iterator >::getEntryNode(), llvm::GraphTraits< SUnit * >::getEntryNode(), llvm::GraphTraits< MemoryAccess * >::getEntryNode(), llvm::GraphTraits< Inverse< MemoryAccess * > >::getEntryNode(), llvm::GraphTraits< LazyCallGraph::Node * >::getEntryNode(), llvm::GraphTraits< LazyCallGraph * >::getEntryNode(), llvm::GraphTraits< VPBlockBase * >::getEntryNode(), llvm::GraphTraits< const VPBlockBase * >::getEntryNode(), llvm::GraphTraits< SDNode * >::getEntryNode(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getEstimatedNumberOfCaseClusters(), llvm::SparcTargetLowering::getExceptionSelectorRegister(), getExpandedMinMaxOps(), llvm::MipsTargetLowering::getExtendForAtomicOps(), getFauxShuffleMask(), llvm::SCEVWrapPredicate::getFlags(), getFoldedOffsetOf(), getFoldedSizeOf(), GetFPLibCall(), getFPTernOp(), llvm::SelectionDAGBuilder::getFrameIndexTy(), llvm::MipsDAGToDAGISel::getGlobalBaseReg(), llvm::MipsTargetLowering::getGlobalReg(), llvm::ScheduleDAGSDNodes::getGraphNodeLabel(), getHexDigit(), getIntOperandFromRegisterString(), llvm::ScaledNumber< uint64_t >::getInverse(), llvm::getKnownAlignment(), llvm::GCOVBlock::getLastLine(), llvm::SelectionDAG::getMachineNode(), llvm::AMDGPU::IsaInfo::getMaxWorkGroupsPerCU(), llvm::SelectionDAG::getMemIntrinsicNode(), getMetadataTypeOrder(), getMulHu(), llvm::rdf::Liveness::getNearestAliasedRef(), llvm::rdf::DataFlowGraph::getNextShadow(), getNMDOps(), llvm::SelectionDAG::getNode(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getNodeAttributes(), llvm::ilist_detail::NodeAccess::getNodePtr(), llvm::ilist_detail::SpecificNodeAccess< ilist_detail::compute_node_options< Instruction, Options... >::type >::getNodePtr(), getNonCompileUnitScope(), llvm::SelectionDAGBuilder::getNonRegisterValue(), llvm::Type::getNumContainedTypes(), llvm::cflaa::CFLGraph::ValueInfo::getNumLevels(), llvm::InstrProfRecord::getNumValueData(), llvm::AArch64CC::getNZCVToSatisfyCondCode(), llvm::VPUser::getOperand(), llvm::GVNExpression::BasicExpression::getOperand(), llvm::NamedMDNode::getOperand(), llvm::BitCodeAbbrev::getOperandInfo(), getOptimizationFlags(), llvm::cl::parser< const PassInfo *>::getOption(), llvm::cl::parser< const PassInfo *>::getOptionValue(), llvm::MachineFunction::getOrCreateLandingPadInfo(), llvm::FoldingSetBase::GetOrInsertNode(), getOrSelfReference(), llvm::HvxSelector::getPairVT(), llvm::AVRDAGToDAGISel::getPassName(), llvm::HexagonTargetLowering::getPostIndexedAddressParts(), getPow(), llvm::SCEVUnionPredicate::getPredicates(), llvm::PPCTargetLowering::getPreIndexedAddressParts(), GetPromotionOpcode(), GetQuadraticEquation(), llvm::Thumb1InstrInfo::getRegisterInfo(), llvm::MSP430TargetLowering::getScalarShiftAmountTy(), llvm::XCoreTargetLowering::getScalarShiftAmountTy(), llvm::X86TargetLowering::getScalarShiftAmountTy(), llvm::AVRTargetLowering::getSetCCResultType(), getShiftAmountTyForConstant(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::pdb::PDBFile::getStringTable(), getSuccPad(), llvm::SelectionDAG::getTargetMemSDNode(), llvm::BPFTargetLowering::getTargetNodeName(), llvm::ARCTargetLowering::getTargetNodeName(), llvm::DbgVariable::getType(), llvm::MachineFunction::getTypeIDFor(), getUnderlyingArgReg(), llvm::BasicBlock::getUniquePredecessor(), llvm::pdb::NativeSymbolEnumerator::getValue(), llvm::opt::Arg::getValue(), llvm::SDValue::getValue(), llvm::SelectionDAGBuilder::getValue(), llvm::InstrProfRecord::getValueForSite(), llvm::ilist_detail::NodeAccess::getValuePtr(), llvm::ilist_detail::SpecificNodeAccess< ilist_detail::compute_node_options< Instruction, Options... >::type >::getValuePtr(), GetVBR(), getVCmpInst(), llvm::PPC::getVSPLTImmediate(), llvm::ScalarEvolution::getZeroExtendExpr(), llvm::IntEqClasses::grow(), hasConflictingReferenceFlags(), llvm::pdb::PdbHashTraits< uint32_t >::hashLookupKey(), llvm::Function::hasLazyArguments(), hasMoreThanOneUseOtherThanLLVMUsed(), llvm::hasNItems(), llvm::hasNItemsOrMore(), llvm::Value::hasOneUse(), hasOnlySelectUsers(), hasSingleUsesFromRoot(), hasVectorBeenPadded(), llvm::detail::IEEEFloat::IEEEFloat(), llvm::SCEVEqualPredicate::implies(), llvm::SCEVWrapPredicate::implies(), llvm::rdf::IndexedSet< const uint32_t *>::IndexedSet(), llvm::PressureDiffs::init(), llvm::bfi_detail::IrreducibleGraph::initialize(), INITIALIZE_PASS(), llvm::SlotTracker::initializeIndexIfNeeded(), initializeOutputStream(), llvm::ResourcePriorityQueue::initNumRegDefsLeft(), llvm::SmallSet< unsigned, 16 >::insert(), llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::insertFrom(), llvm::LazyCallGraph::RefSCC::insertIncomingRefEdge(), llvm::FoldingSetBase::InsertNode(), llvm::SystemZTargetLowering::insertSSPDeclarations(), instrumentMaskedLoadOrStore(), llvm::IntEqClasses::IntEqClasses(), llvm::xray::Profile::internPath(), llvm::rdf::CopyPropagation::interpretAsCopy(), llvm::FunctionAnalysisManagerCGSCCProxy::Result::invalidate(), llvm::PhiValues::invalidateValue(), llvm::ScaledNumber< uint64_t >::inverse(), isADDADDMUL(), isAddSubOrSubAdd(), llvm::LazyCallGraph::SCC::isAncestorOf(), llvm::LazyCallGraph::RefSCC::isAncestorOf(), isAnyConstantBuildVector(), llvm::TargetLowering::DAGCombinerInfo::isCalledByLegalizer(), isCanonical(), llvm::NVPTXTargetLowering::isCheapToSpeculateCtlz(), llvm::ISD::isConstantSplatVector(), llvm::TargetLowering::isConstFalseVal(), isContractable(), llvm::HexagonTargetLowering::isCtlzFast(), llvm::ItaniumPartialDemangler::isCtorOrDtor(), isDebug(), isDINode(), llvm::ISD::isEXTLoad(), llvm::TargetLowering::isGAPlusOffset(), isIgnorableInst(), isImmMskBitp(), llvm::isInt(), isInt32Immediate(), isInt64Immediate(), isIntersect(), llvm::APInt::isIntN(), llvm::isIntS16Immediate(), llvm::SelectionDAGISel::IsLegalToFold(), isLoopIncrement(), isMemOPCandidate(), llvm::SITargetLowering::isMemOpHasNoClobberedMemOperand(), llvm::SITargetLowering::isMemOpUniform(), llvm::ISD::isNON_EXTLoad(), llvm::ISD::isNON_TRUNCStore(), llvm::ISD::isNormalLoad(), llvm::ISD::isNormalStore(), isOpcodeHandled(), isOpcWithIntImmediate(), isOperandUnresolved(), llvm::LazyCallGraph::SCC::isParentOf(), llvm::LazyCallGraph::RefSCC::isParentOf(), isPerfectIncrement(), isPermutation(), llvm::SUnit::isPred(), IsPredicateKnownToFail(), llvm::PPC::isQVALIGNIShuffleMask(), isReportingError(), isSchedBoundary(), llvm::AMDGPUTargetLowering::isSDNodeAlwaysUniform(), llvm::SITargetLowering::isSDNodeSourceOfDivergence(), isSETCCorConvertedSETCC(), llvm::ISD::isSEXTLoad(), isSExtLoad(), llvm::isShiftedInt(), llvm::isShiftedUInt(), llvm::APInt::isSignedIntN(), isSimpleIVUser(), IsSingleInstrConstant(), isSlicingProfitable(), isStackPtrRelative(), llvm::X86InstrInfo::isSubregFoldable(), llvm::SUnit::isSucc(), isTargetConstant(), llvm::HexagonInstrInfo::isToBeScheduledASAP(), isTruncateOf(), llvm::ISD::isTRUNCStore(), llvm::isUInt(), llvm::ISD::isUNINDEXEDLoad(), llvm::ISD::isUNINDEXEDStore(), llvm::AArch64_AM::isValidDecodeLogicalImmediate(), isValidIndexedLoad(), isVectorAllOnes(), llvm::PPC::isVSLDOIShuffleMask(), isWorthFoldingADDlow(), isZero(), llvm::ISD::isZEXTLoad(), llvm::SelectionDAG::Legalize(), llvm::IntervalMapImpl::Path::legalizeForInsert(), LLVMAddNamedMetadataOperand(), LLVMCreateGenericValueOfFloat(), LLVMGetMDNodeOperands(), LLVMGetNamedMetadataNumOperands(), LLVMGetNamedMetadataOperands(), LLVMSetMetadata(), llvm::MipsSEInstrInfo::loadImmediate(), llvm::XCoreInstrInfo::loadImmediate(), loadTestingFormat(), llvm::pdb::PdbHashTraits< uint32_t >::lookupKeyToStorageKey(), LoopIsOuterMostWithPredecessor(), lowerAtomicArith(), lowerAtomicArithWithLOCK(), llvm::HexagonTargetLowering::LowerBITCAST(), lowerCallResult(), llvm::LanaiTargetLowering::LowerConstantPool(), llvm::AMDGPUTargetLowering::LowerFP_TO_FP16(), LowerInterruptReturn(), llvm::MSP430TargetLowering::LowerJumpTable(), llvm::RISCVTargetLowering::LowerOperation(), llvm::SystemZTargetLowering::LowerOperationWrapper(), llvm::HexagonTargetLowering::LowerSETCC(), llvm::MSP430TargetLowering::LowerShifts(), llvm::codeview::CodeViewRecordIO::mapEncodedInteger(), mapNameAndUniqueName(), maskMatters(), llvm::maskTrailingOnes(), matchSVEPredicateVectorRegName(), llvm::maxUIntN(), llvm::mayBeOldLoopAttachmentTag(), mayTailCallThisCC(), mayUseP9Setb(), mayUsePostIncMode(), mergeConditionalStoreToAddress(), llvm::Mips16DAGToDAGISel::Mips16DAGToDAGISel(), llvm::MipsSEDAGToDAGISel::MipsSEDAGToDAGISel(), llvm::SelectionDAG::MorphNodeTo(), llvm::IntervalMapImpl::NodeBase< std::pair< KeyT, KeyT >, ValT, N >::moveRight(), llvm::ScaledNumbers::multiply64(), llvm::MDNode::mutable_operands(), narrowUDivURem(), NarrowVector(), nextLEB(), nodeListToNodeArray(), numVectorEltsOrZero(), llvm::IntrusiveBackList< T >::iterator::operator bool(), llvm::IntrusiveBackList< T >::const_iterator::operator bool(), llvm::MDNode::operator delete(), operator new(), llvm::pdb::DbiModuleSourceFilesIterator::operator*(), llvm::IntrusiveBackList< T >::iterator::operator*(), llvm::IntrusiveBackList< T >::const_iterator::operator*(), llvm::detail::value_sequence_iterator< ValueT >::operator+=(), llvm::pdb::DbiModuleSourceFilesIterator::operator+=(), llvm::codeview::TypeIndex::operator+=(), llvm::VarStreamArrayIterator< ValueType, Extractor >::operator+=(), llvm::FixedStreamArrayIterator< PSHashRecord >::operator+=(), llvm::SwitchInst::CaseIteratorImpl< CaseHandleT >::operator+=(), llvm::detail::value_sequence_iterator< ValueT >::operator-=(), llvm::pdb::DbiModuleSourceFilesIterator::operator-=(), llvm::codeview::TypeIndex::operator-=(), llvm::FixedStreamArrayIterator< PSHashRecord >::operator-=(), llvm::SwitchInst::CaseIteratorImpl< CaseHandleT >::operator-=(), llvm::opt::operator<(), llvm::DiagnosticPrinterRawOStream::operator<<(), OutputStream::operator<<(), llvm::rdf::operator<<(), llvm::raw_ostream::operator<<(), llvm::SmallBitVector::operator<<=(), llvm::InstrProfRecord::operator=(), llvm::LazyCallGraph::operator=(), llvm::LazyCallGraph::Node::operator==(), llvm::SmallBitVector::operator>>=(), llvm::ScaledNumber< uint64_t >::operator>>=(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), llvm::yaml::CustomMappingTraits< msgpack::MapNode >::output(), llvm::ms_demangle::ArrayTypeNode::outputOneDimension(), llvm::InlineAsm::ConstraintInfo::Parse(), llvm::itanium_demangle::parse_discriminator(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseAbiTags(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseExprPrimary(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseFloatingLiteral(), llvm::MetadataLoader::parseFunctionMetadata(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseLocalName(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::parseName(), parseOptionalLinkageAux(), llvm::ms_demangle::Demangler::parseTagUniqueName(), parseVersion(), partitionShuffleOfConcats(), Passv64i1ArgInRegs(), llvm::R600TargetLowering::PerformDAGCombine(), llvm::PPCTargetLowering::PerformDAGCombine(), performGlobalAddressCombine(), llvm::AMDGPUTargetLowering::performLoadCombine(), performNEONPostLDSTCombine(), PerformSETCCCombine(), llvm::AMDGPUTargetLowering::performStoreCombine(), PerformSTORECombine(), PerformVECTOR_SHUFFLECombine(), PickMostRelevantLoop(), pickOpcodeForVT(), pointerInvalidatedByLoop(), llvm::SelectionDAGISel::PostprocessISelDAG(), llvm::HexagonMCInstrInfo::predicateInfo(), llvm::HexagonDAGToDAGISel::PreprocessISelDAG(), llvm::format_object_base::print(), llvm::PhiValues::print(), llvm::DIEAbbrev::print(), llvm::PassManagerPrettyStackEntry::print(), llvm::ValueEnumerator::print(), llvm::GCOVBlock::print(), llvm::FileInfo::printBranchInfo(), llvm::RuntimePointerChecking::printChecks(), printConstant(), llvm::PrintDomTree(), llvm::itanium_demangle::FloatLiteralImpl< Float >::printLeft(), llvm::printMBBReference(), llvm::AMDGPUInstPrinter::printRegOperand(), printSCC(), llvm::DebugInfoFinder::processDeclare(), llvm::AArch64_AM::processLogicalImmediate(), llvm::DebugInfoFinder::processValue(), llvm::DIEAbbrev::Profile(), llvm::IntrusiveBackListBase::push_back(), raise_relocation_error(), llvm::BinaryStreamReader::readEnum(), llvm::readPGOFuncNameStrings(), llvm::coverage::RawCoverageReader::readULEB128(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::reattachExistingSubtree(), llvm::ImutAVLFactory< ImutInfo >::recoverNodes(), llvm::ScheduleDAGInstrs::reduceHugeMemNodeMaps(), llvm::TargetRegisterInfo::regmaskSubsetEqual(), llvm::ilist_base< EnableSentinelTracking >::remove(), llvm::simple_ilist< MachineInstr, Options... >::remove(), llvm::simple_ilist< MachineInstr, Options... >::removeAndDispose(), llvm::LazyCallGraph::removeDeadFunction(), llvm::SelectionDAG::RemoveDeadNodes(), llvm::MachineFunction::removeFromMBBNumbering(), llvm::LazyCallGraph::RefSCC::removeInternalRefEdge(), llvm::cl::parser< const PassInfo *>::removeLiteralOption(), llvm::MachineInstr::RemoveOperand(), llvm::SUnit::removePred(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::RemoveRedundantRoots(), repeat(), replaceAllUsesOfWithIn(), llvm::DIBuilder::replaceArrays(), ReplaceCMP_SWAP_128Results(), ReplaceCMP_SWAP_64Results(), ReplaceINTRINSIC_W_CHAIN(), ReplaceLoadVector(), llvm::scc_iterator< GraphT, GT >::ReplaceNode(), llvm::LazyCallGraph::RefSCC::replaceNodeFunction(), llvm::SparcTargetLowering::ReplaceNodeResults(), llvm::X86TargetLowering::ReplaceNodeResults(), replaceShuffleOfInsert(), llvm::DIBuilder::replaceVTableHolder(), llvm::HexagonMCChecker::reportBranchErrors(), llvm::rdf::Liveness::resetKills(), llvm::BitVector::resize(), llvm::ReplaceableMetadataImpl::resolveAllUses(), llvm::MDNode::resolveCycles(), llvm::itanium_demangle::AbstractManglingParser< ManglingParser< Alloc >, Alloc >::resolveForwardTemplateRefs(), RetagMask(), llvm::StringRef::rfind(), llvm::StringRef::rfind_lower(), llvm::RISCVTargetLowering::RISCVTargetLowering(), llvm::SyntheticCountsPropagation::run(), llvm::BreakCriticalEdgesPass::run(), llvm::ArgumentPromotionPass::run(), llvm::rdf::CopyPropagation::run(), llvm::PostOrderFunctionAttrsPass::run(), llvm::InlinerPass::run(), llvm::CGSCCToFunctionPassAdaptor< FunctionPassT >::run(), llvm::DevirtSCCRepeatedPass< PassT >::run(), llvm::NVPTXDAGToDAGISel::runOnMachineFunction(), llvm::RegisterClassInfo::runOnMachineFunction(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::runSemiNCA(), llvm::IntervalMapImpl::LeafNode< KeyT, ValT, N, Traits >::safeFind(), llvm::IntervalMapImpl::BranchNode< KeyT, ValT, RootBranchCap, Traits >::safeFind(), scavengeFrameVirtualRegsInBlock(), llvm::SDDbgValue::SDDbgValue(), llvm::PPCTargetLowering::SelectAddressRegImm(), llvm::PPCTargetLowering::SelectAddressRegRegOnly(), llvm::HexagonDAGToDAGISel::SelectAddrFI(), llvm::HexagonDAGToDAGISel::SelectAnyImmediate(), llvm::HexagonDAGToDAGISel::SelectAnyInt(), llvm::SelectionDAGISel::SelectCodeCommon(), llvm::HexagonDAGToDAGISel::SelectConstant(), llvm::HexagonDAGToDAGISel::SelectConstantFP(), llvm::HexagonDAGToDAGISel::SelectFrameIndex(), llvm::FastISel::selectGetElementPtr(), selectI64Imm(), llvm::AVRDAGToDAGISel::selectIndexedLoad(), llvm::HexagonDAGToDAGISel::SelectIndexedLoad(), llvm::HexagonDAGToDAGISel::SelectLoad(), llvm::SelectionDAG::SelectNodeTo(), llvm::HexagonDAGToDAGISel::SelectSHL(), llvm::HvxSelector::selectShuffle(), llvm::HexagonDAGToDAGISel::SelectStore(), llvm::HexagonDAGToDAGISel::SelectV65Gather(), llvm::HexagonDAGToDAGISel::SelectV65GatherPred(), setBranchWeights(), llvm::MCEncodedFragment::setBundlePadding(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::SelectionDAG::setGraphAttrs(), llvm::SelectionDAG::setGraphColor(), llvm::AMDGPULibFuncImpl::setName(), llvm::MachinePassRegistryNode< FunctionPassCtor >::setNext(), llvm::rdf::NodeBase::setNext(), llvm::FoldingSetBase::Node::SetNextInBucket(), llvm::SDValue::setNode(), llvm::SUnit::setNode(), llvm::DIEAbbrev::setNumber(), llvm::MachineBasicBlock::setNumber(), llvm::GVNExpression::BasicExpression::setOperand(), llvm::SelectionDAG::setRoot(), setSummary(), llvm::SelectionDAGBuilder::setUnusedArgValue(), llvm::SelectionDAGBuilder::setValue(), llvm::DwarfDebug::shareAcrossDWOCUs(), shiftRightAndRound(), shouldInstrumentBlock(), llvm::AMDGPUTargetLowering::shouldReduceLoadWidth(), ShrinkLoadReplaceStoreWithStore(), llvm::TargetLowering::SimplifyDemandedBits(), SimplifyOrInst(), simplifySuspendPoints(), sinkInstruction(), llvm::integer_sequence< std::size_t, I... >::size(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::slice(), llvm::MutableArrayRef< BitWord >::slice(), SortBlocks(), llvm::SplitModule(), splitStores(), llvm::sampleprof::SampleProfileWriterBinary::stablizeNameTable(), llvm::pdb::PdbHashTraits< uint32_t >::storageKeyToLookupKey(), llvm::MDNode::storeImpl(), llvm::opt::StrCmpOptionName(), llvm::StrInStrNoCase(), llvm::StripDebugInfo(), stripDebugLocFromLoopID(), stripExtractLoElt(), llvm::PPCTargetLowering::supportSplitCSR(), llvm::ResourcePriorityQueue::SUSchedulingCost(), swapAntiDependences(), llvm::LazyCallGraph::RefSCC::switchInternalEdgeToCall(), llvm::LazyCallGraph::RefSCC::switchInternalEdgeToRef(), synthesizeVariable(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::take_back(), llvm::MutableArrayRef< BitWord >::take_back(), llvm::StringRef::take_back(), llvm::ArrayRef< llvm::irsymtab::storage::Comdat >::take_front(), llvm::MutableArrayRef< BitWord >::take_front(), llvm::StringRef::take_front(), llvm::ScaledNumber< uint64_t >::toInt(), llvm::APInt::toString(), tryToElideArgumentCopy(), TypeSizeToSizeIndex(), uniquifyImpl(), llvm::X86TargetLowering::unwrapAddress(), llvm::TargetLowering::unwrapAddress(), unwrapLoop(), llvm::SelectionDAG::updateDivergence(), updateNewSCCFunctionAnalyses(), llvm::SelectionDAG::UpdateNodeOperands(), llvm::RegionInfoBase< RegionTraits< Function > >::updateRegionTree(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::UpdateRootsAfterUpdate(), llvm::upgradeInstructionLoopAttachment(), llvm::User::User(), llvm::SDNode::uses(), llvm::yaml::Stream::validate(), validExtractValueIndex(), llvm::SelectionDAG::VerifyDAGDiverence(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyReachability(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifyRoots(), VerifySDNode(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::verifySiblingProperty(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAdd(), llvm::SelectionDAGBuilder::visitBitTestCase(), llvm::InstCombiner::visitCallInst(), visitDomSubTree(), llvm::codeview::TypeRecordMapping::visitMemberEnd(), llvm::codeview::TypeDumpVisitor::visitMemberEnd(), llvm::codeview::SymbolRecordMapping::visitSymbolEnd(), wrapConstantAsMetadata(), llvm::msgpack::ArrayNode::write(), llvm::msgpack::MapNode::write(), llvm::write_double(), llvm::write_hex(), llvm::yaml::BinaryRef::writeAsBinary(), WriteConstantInternal(), llvm::WriteGraph(), llvm::sampleprof::SampleProfileWriterRawBinary::writeNameTable(), llvm::sampleprof::SampleProfileWriterCompactBinary::writeNameTable(), llvm::SelectionDAG::DAGUpdateListener::~DAGUpdateListener(), llvm::DeltaAlgorithm::~DeltaAlgorithm(), and llvm::SelectionDAG::~SelectionDAG().

◆ never

#define never   0 /* some <assert.h>s have bugs too */

Definition at line 285 of file regcomp.c.

Referenced by firstch().

◆ NEXT

#define NEXT ( )    (p->next++)

Definition at line 257 of file regcomp.c.

Referenced by p_b_cclass(), p_b_coll_elem(), p_b_term(), p_ere_exp(), and p_simp_re().

◆ NEXT2

#define NEXT2 ( )    (p->next += 2)

Definition at line 258 of file regcomp.c.

Referenced by p_b_term().

◆ NEXTn

#define NEXTn (   n)    (p->next += (n))

Definition at line 259 of file regcomp.c.

Referenced by p_bracket().

◆ NPAREN

#define NPAREN   10 /* we need to remember () 1-9 for back refs */

Definition at line 200 of file regcomp.c.

Referenced by doinsert(), llvm_regcomp(), p_ere_exp(), and p_simp_re().

◆ PEEK

#define PEEK ( )    (*p->next)

Definition at line 249 of file regcomp.c.

Referenced by p_b_cclass(), p_b_term(), p_bracket(), p_count(), p_ere(), p_ere_exp(), and p_simp_re().

◆ PEEK2

#define PEEK2 ( )    (*(p->next+1))

Definition at line 250 of file regcomp.c.

Referenced by p_b_term(), and p_ere_exp().

◆ REP

#define REP (   f,
 
)    ((f)*8 + (t))

Referenced by repeat().

◆ REQUIRE

#define REQUIRE (   co,
 
)    (void)((co) || SETERROR(e))

Definition at line 262 of file regcomp.c.

Referenced by p_b_symbol(), p_b_term(), p_bre(), p_count(), p_ere(), p_ere_exp(), p_simp_re(), and p_str().

◆ SEE

#define SEE (   c)    (MORE() && PEEK() == (c))

Definition at line 253 of file regcomp.c.

Referenced by isLoadConditional(), p_b_term(), p_ere(), and p_ere_exp().

◆ SEETWO

#define SEETWO (   a,
 
)    (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))

Definition at line 254 of file regcomp.c.

Referenced by p_b_coll_elem(), p_bracket(), p_bre(), and p_simp_re().

◆ SETERROR

#define SETERROR (   e)    seterr(p, (e))

◆ THERE

#define THERE ( )    (p->slen - 1)

Definition at line 271 of file regcomp.c.

Referenced by llvm_regcomp(), p_ere(), p_ere_exp(), and repeat().

◆ THERETHERE

#define THERETHERE ( )    (p->slen - 2)

Definition at line 272 of file regcomp.c.

Referenced by p_ere_exp(), and repeat().

Function Documentation

◆ allocset()

static cset * allocset ( struct parse p)
static

◆ bothcases()

static void bothcases ( struct parse p,
int  ch 
)
static

Definition at line 1046 of file regcomp.c.

References assert(), parse::end, parse::next, othercase(), and p_bracket().

Referenced by ordinary().

◆ categorize()

static void categorize ( struct parse p,
struct re_guts g 
)
static

Definition at line 1423 of file regcomp.c.

References re_guts::categories, parse::error, isinsets(), re_guts::ncategories, and samesets().

Referenced by llvm_regcomp().

◆ doemit()

static void doemit ( struct parse p,
sop  op,
size_t  opnd 
)
static

Definition at line 1474 of file regcomp.c.

References assert(), enlarge(), parse::error, OPSHIFT, parse::slen, SOP, parse::ssize, and parse::strip.

◆ dofwd()

static void dofwd ( struct parse p,
sopno  pos,
sop  value 
)
static

Definition at line 1531 of file regcomp.c.

References assert(), parse::error, OP, OPSHIFT, and parse::strip.

◆ doinsert()

static void doinsert ( struct parse p,
sop  op,
size_t  opnd,
sopno  pos 
)
static

◆ dupl()

static sopno dupl ( struct parse p,
sopno  start,
sopno  finish 
)
static

Definition at line 1448 of file regcomp.c.

References assert(), enlarge(), HERE, llvm::Intrinsic::memmove, parse::slen, parse::ssize, and parse::strip.

Referenced by p_ere_exp(), p_simp_re(), and repeat().

◆ enlarge()

static void enlarge ( struct parse p,
sopno  size 
)
static

Definition at line 1545 of file regcomp.c.

References REG_ESPACE, SETERROR, llvm::size(), parse::ssize, and parse::strip.

Referenced by doemit(), and dupl().

◆ findmust()

static void findmust ( struct parse p,
struct re_guts g 
)
static

◆ firstch()

static int firstch ( struct parse p,
cset cs 
)
static

Definition at line 1307 of file regcomp.c.

References assert(), CHIN, re_guts::csetsize, for(), parse::g, and never.

Referenced by p_bracket().

◆ freeset()

static void freeset ( struct parse p,
cset cs 
)
static

Definition at line 1254 of file regcomp.c.

References CHsub, re_guts::csetsize, for(), parse::g, re_guts::ncsets, and re_guts::sets.

Referenced by freezeset(), and p_bracket().

◆ freezeset()

static int freezeset ( struct parse p,
cset cs 
)
static

Definition at line 1276 of file regcomp.c.

References CHIN, re_guts::csetsize, for(), freeset(), parse::g, cset::hash, re_guts::ncsets, and re_guts::sets.

Referenced by p_bracket().

◆ isinsets()

static int isinsets ( struct re_guts g,
int  c 
)
static

Definition at line 1388 of file regcomp.c.

References re_guts::ncsets, and re_guts::setbits.

Referenced by categorize().

◆ llvm_regcomp()

int llvm_regcomp ( llvm_regex_t preg,
const char pattern,
int  cflags 
)

◆ mcadd()

static void mcadd ( struct parse p,
cset cs,
const char cp 
)
static

Definition at line 1339 of file regcomp.c.

References llvm_strlcpy(), cset::multis, REG_ESPACE, SETERROR, and cset::smultis.

◆ mccase()

static void mccase ( struct parse p,
cset cs 
)
static

Definition at line 1379 of file regcomp.c.

References assert(), and cset::multis.

Referenced by p_bracket().

◆ mcinvert()

static void mcinvert ( struct parse p,
cset cs 
)
static

Definition at line 1366 of file regcomp.c.

References assert(), and cset::multis.

Referenced by p_bracket().

◆ nch()

static int nch ( struct parse p,
cset cs 
)
static

Definition at line 1323 of file regcomp.c.

References CHIN, re_guts::csetsize, for(), and parse::g.

Referenced by p_bracket().

◆ nonnewline()

static void nonnewline ( struct parse p)
static

Definition at line 1088 of file regcomp.c.

References assert(), parse::end, parse::next, and p_bracket().

Referenced by p_ere_exp(), and p_simp_re().

◆ ordinary()

static void ordinary ( struct parse p,
int  ch 
)
static

◆ othercase()

static char othercase ( int  ch)
static

Definition at line 1028 of file regcomp.c.

References assert().

Referenced by bothcases(), ordinary(), and p_bracket().

◆ p_b_cclass()

static void p_b_cclass ( struct parse p,
cset cs 
)
static

Definition at line 938 of file regcomp.c.

References cclasses, CHadd, cclass::chars, MCadd, MORE, cclass::multis, cclass::name, parse::next, NEXT, PEEK, REG_ECTYPE, and SETERROR.

Referenced by p_b_term().

◆ p_b_coll_elem()

static char p_b_coll_elem ( struct parse p,
int  endc 
)
static

Definition at line 1001 of file regcomp.c.

References cnames, cname::code, MORE, cname::name, parse::next, NEXT, REG_EBRACK, REG_ECOLLATE, SEETWO, and SETERROR.

Referenced by p_b_eclass(), and p_b_symbol().

◆ p_b_eclass()

static void p_b_eclass ( struct parse p,
cset cs 
)
static

Definition at line 971 of file regcomp.c.

References CHadd, and p_b_coll_elem().

Referenced by p_b_term().

◆ p_b_symbol()

static char p_b_symbol ( struct parse p)
static

Definition at line 983 of file regcomp.c.

References EATTWO, GETNEXT, MORE, p_b_coll_elem(), REG_EBRACK, REG_ECOLLATE, and REQUIRE.

Referenced by p_b_term().

◆ p_b_term()

static void p_b_term ( struct parse p,
cset cs 
)
static

◆ p_bracket()

static void p_bracket ( struct parse p)
static

◆ p_bre()

static void p_bre ( struct parse p,
int  end1,
int  end2 
)
static

◆ p_count()

static int p_count ( struct parse p)
static

Definition at line 775 of file regcomp.c.

References llvm::count(), DUPMAX, GETNEXT, MORE, PEEK, REG_BADBR, and REQUIRE.

Referenced by p_ere_exp(), and p_simp_re().

◆ p_ere()

static void p_ere ( struct parse p,
int  stop 
)
static

Definition at line 392 of file regcomp.c.

References AHEAD, assert(), ASTERN, EAT, EMIT, first, HERE, INSERT, MORE, O_CH, OCH_, OOR1, OOR2, p_ere_exp(), PEEK, REG_EMPTY, REQUIRE, SEE, and THERE.

Referenced by llvm_regcomp(), and p_ere_exp().

◆ p_ere_exp()

static void p_ere_exp ( struct parse p)
static

◆ p_simp_re()

static int p_simp_re ( struct parse p,
int  starordinary 
)
static

◆ p_str()

static void p_str ( struct parse p)
static

Definition at line 610 of file regcomp.c.

References GETNEXT, MORE, ordinary(), REG_EMPTY, and REQUIRE.

Referenced by llvm_regcomp().

◆ pluscount()

static sopno pluscount ( struct parse p,
struct re_guts g 
)
static

Definition at line 1674 of file regcomp.c.

References parse::error, re_guts::iflags, O_PLUS, OEND, OP, OPLUS_, REGEX_BAD, scan(), and re_guts::strip.

Referenced by llvm_regcomp().

◆ repeat()

static void repeat ( struct parse p,
sopno  start,
int  from,
int  to 
)
static

Definition at line 1110 of file regcomp.c.

References AHEAD, assert(), ASTERN, llvm::copy(), DROP, dupl(), EMIT, parse::error, HERE, INF, INSERT, MAP, N, O_CH, O_PLUS, OCH_, OOR1, OOR2, OPLUS_, REG_ASSERT, REP, SETERROR, THERE, and THERETHERE.

Referenced by p_ere_exp(), and p_simp_re().

◆ samesets()

static int samesets ( struct re_guts g,
int  c1,
int  c2 
)
static

Definition at line 1405 of file regcomp.c.

References re_guts::ncsets, and re_guts::setbits.

Referenced by categorize().

◆ seterr()

static int seterr ( struct parse p,
int  e 
)
static

Definition at line 1180 of file regcomp.c.

References parse::end, parse::error, parse::next, and nuls.

◆ stripsnug()

static void stripsnug ( struct parse p,
struct re_guts g 
)
static

Definition at line 1570 of file regcomp.c.

References re_guts::nstates, REG_ESPACE, SETERROR, parse::slen, re_guts::strip, and parse::strip.

Referenced by llvm_regcomp().

Variable Documentation

◆ cclasses

struct cclass cclasses[]
static
Initial value:
= {
{ "alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789", ""} ,
{ "alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
""} ,
{ "blank", " \t", ""} ,
{ "cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
\25\26\27\30\31\32\33\34\35\36\37\177", ""} ,
{ "digit", "0123456789", ""} ,
{ "graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
""} ,
{ "lower", "abcdefghijklmnopqrstuvwxyz",
""} ,
{ "print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
""} ,
{ "punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
""} ,
{ "space", "\t\n\v\f\r ", ""} ,
{ "upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
""} ,
{ "xdigit", "0123456789ABCDEFabcdef",
""} ,
{ NULL, 0, "" }
}

Referenced by p_b_cclass().

◆ cnames

struct cname cnames[]
static

Referenced by p_b_coll_elem().

◆ nuls

char nuls[10]
static

Definition at line 243 of file regcomp.c.

Referenced by seterr().