| /freebsd/contrib/llvm-project/clang/include/clang/Basic/ |
| H A D | JsonSupport.h | 34 size_t Pos = 0; in JsonFormat() local 38 Pos = Str.find('\\', Pos); in JsonFormat() 39 if (Pos == std::string::npos) in JsonFormat() 43 size_t TempPos = (Pos != 0) ? Pos - 1 : 0; in JsonFormat() 46 if (TempPos != Str.find("\\\\", Pos)) { in JsonFormat() 47 Str.insert(Pos, "\\"); in JsonFormat() 48 ++Pos; // As we insert the backslash move plus one. in JsonFormat() 51 ++Pos; in JsonFormat() 55 Pos = 0; in JsonFormat() 57 Pos = Str.find('\"', Pos); in JsonFormat() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/fuzzer/ |
| H A D | FuzzerIOWindows.cpp | 92 size_t Pos = Path.find_last_of("/\\"); in Basename() local 93 if (Pos == std::string::npos) return Path; in Basename() 94 assert(Pos < Path.size()); in Basename() 95 return Path.substr(Pos + 1); in Basename() 263 size_t Pos = Offset; in ParseFileName() local 265 for(; Pos < End && !IsSeparator(FileName[Pos]); ++Pos) in ParseFileName() 267 return Pos - Offset; in ParseFileName() 273 size_t Pos = Offset; in ParseDir() local 275 if (Pos >= End || IsSeparator(FileName[Pos])) in ParseDir() 277 for(; Pos < End && !IsSeparator(FileName[Pos]); ++Pos) in ParseDir() [all …]
|
| H A D | FuzzerUtil.cpp | 98 for (size_t Pos = L; Pos <= R; Pos++) { in ParseOneDictionaryEntry() local 99 uint8_t V = (uint8_t)Str[Pos]; in ParseOneDictionaryEntry() 103 if (Pos + 1 <= R && (Str[Pos + 1] == '\\' || Str[Pos + 1] == '"')) { in ParseOneDictionaryEntry() 104 U->push_back(Str[Pos + 1]); in ParseOneDictionaryEntry() 105 Pos++; in ParseOneDictionaryEntry() 109 if (Pos + 3 <= R && Str[Pos + 1] == 'x' in ParseOneDictionaryEntry() 110 && isxdigit(Str[Pos + 2]) && isxdigit(Str[Pos + 3])) { in ParseOneDictionaryEntry() 112 Hex[2] = Str[Pos + 2]; in ParseOneDictionaryEntry() 113 Hex[3] = Str[Pos + 3]; in ParseOneDictionaryEntry() 115 Pos += 3; in ParseOneDictionaryEntry() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | LineIterator.cpp | 58 const char *Pos = CurrentLine.end(); in advance() local 59 assert(Pos == Buffer->getBufferStart() || isAtLineEnd(Pos) || *Pos == '\0'); in advance() 61 if (skipIfAtLineEnd(Pos)) in advance() 63 if (!SkipBlanks && isAtLineEnd(Pos)) { in advance() 67 while (skipIfAtLineEnd(Pos)) in advance() 72 if (isAtLineEnd(Pos) && !SkipBlanks) in advance() 74 if (*Pos == CommentMarker) in advance() 76 ++Pos; in advance() 77 } while (*Pos != '\0' && !isAtLineEnd(Pos)); in advance() 78 if (!skipIfAtLineEnd(Pos)) in advance() [all …]
|
| H A D | FoldingSet.cpp | 55 unsigned Pos = 0; in AddString() local 61 Pos = (Units + 1) * 4; in AddString() 69 for (Pos += 4; Pos <= Size; Pos += 4) { in AddString() 70 unsigned V = ((unsigned char)String[Pos - 4] << 24) | in AddString() 71 ((unsigned char)String[Pos - 3] << 16) | in AddString() 72 ((unsigned char)String[Pos - 2] << 8) | in AddString() 73 (unsigned char)String[Pos - 1]; in AddString() 77 for (Pos += 4; Pos <= Size; Pos += 4) { in AddString() 78 unsigned V = ((unsigned char)String[Pos - 1] << 24) | in AddString() 79 ((unsigned char)String[Pos - 2] << 16) | in AddString() [all …]
|
| H A D | FileUtilities.cpp | 54 static const char *BackupNumber(const char *Pos, const char *FirstChar) { in BackupNumber() argument 56 if (!isNumberChar(*Pos)) return Pos; in BackupNumber() 60 while (Pos > FirstChar && isNumberChar(Pos[-1])) { in BackupNumber() 62 if (Pos[-1] == '.') { in BackupNumber() 68 --Pos; in BackupNumber() 69 if (Pos > FirstChar && isSignedChar(Pos[0]) && !isExponentChar(Pos[-1])) in BackupNumber() 72 return Pos; in BackupNumber() 78 static const char *EndOfNumber(const char *Pos) { in EndOfNumber() argument 79 while (isNumberChar(*Pos)) in EndOfNumber() 80 ++Pos; in EndOfNumber() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
| H A D | flags_parser.cpp | 59 while (isSeparator(Buffer[Pos])) in skipWhitespace() 60 ++Pos; 64 const uptr NameStart = Pos; in parseFlag() 65 while (Buffer[Pos] != '=' && !isSeparatorOrNull(Buffer[Pos])) in parseFlag() 66 ++Pos; in parseFlag() 67 if (Buffer[Pos] != '=') in parseFlag() 70 const uptr ValueStart = ++Pos; in parseFlag() 72 if (Buffer[Pos] == '\'' || Buffer[Pos] in parseFlag() [all...] |
| H A D | string_utils.cpp | 33 int Pos = 0; in appendNumber() local 35 RAW_CHECK_MSG(static_cast<uptr>(Pos) < MaxLen, in appendNumber() 37 NumBuffer[Pos++] = static_cast<uptr>(AbsoluteValue % Base); in appendNumber() 40 if (Pos < MinNumberLength) { in appendNumber() 41 memset(&NumBuffer[Pos], 0, in appendNumber() 42 sizeof(NumBuffer[0]) * static_cast<uptr>(MinNumberLength - Pos)); in appendNumber() 43 Pos = MinNumberLength; in appendNumber() 45 RAW_CHECK(Pos > 0); in appendNumber() 46 Pos--; in appendNumber() 47 for (; Pos >= 0 && NumBuffer[Pos] == 0; Pos--) { in appendNumber() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ |
| H A D | WholeProgramDevirt.h | 47 std::pair<uint8_t *, uint8_t *> getPtrToData(uint64_t Pos, uint8_t Size) { in getPtrToData() 48 if (Bytes.size() < Pos + Size) { in getPtrToData() 49 Bytes.resize(Pos + Size); in getPtrToData() 50 BytesUsed.resize(Pos + Size); in getPtrToData() 52 return std::make_pair(Bytes.data() + Pos, BytesUsed.data() + Pos); in getPtrToData() 57 void setLE(uint64_t Pos, uint64_t Val, uint8_t Size) { in setLE() 58 assert(Pos % 8 == 0); in setLE() 59 auto DataUsed = getPtrToData(Pos / 8, Size); in setLE() 69 void setBE(uint64_t Pos, uint64_t Val, uint8_t Size) { in setBE() 70 assert(Pos % 8 == 0); in setBE() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | AllocationOrder.h | 46 int Pos = 0; variable 49 Iterator(const AllocationOrder &AO, int Pos) : AO(AO), Pos(Pos) {} in Iterator() argument 52 bool isHint() const { return Pos < 0; } in isHint() 56 if (Pos < 0) 57 return AO.Hints.end()[Pos]; 58 assert(Pos < AO.IterationLimit); 59 return AO.Order[Pos]; 65 if (Pos < AO.IterationLimit) 66 ++Pos; 67 while (Pos >= 0 && Pos < AO.IterationLimit && AO.isHint(AO.Order[Pos])) [all …]
|
| H A D | RenameIndependentSubregs.cpp | 195 SlotIndex Pos = LIS->getInstructionIndex(*MO.getParent()); in findComponents() local 196 Pos = MO.isDef() ? Pos.getRegSlot(MO.isEarlyClobber()) in findComponents() 197 : Pos.getBaseIndex(); in findComponents() 198 const VNInfo *VNI = SR.getVNInfoAt(Pos); in findComponents() 229 SlotIndex Pos = LIS->getInstructionIndex(*MI); in rewriteOperands() local 230 Pos = MO.isDef() ? Pos.getRegSlot(MO.isEarlyClobber()) in rewriteOperands() 231 : Pos.getBaseIndex(); in rewriteOperands() 240 const VNInfo *VNI = SR.getVNInfoAt(Pos); in rewriteOperands() 297 static bool subRangeLiveAt(const LiveInterval &LI, SlotIndex Pos) { in subRangeLiveAt() argument 299 if (SR.liveAt(Pos)) in subRangeLiveAt() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/optional/ |
| H A D | options_parser.cpp | 57 uintptr_t Pos = 0; member in __anone23ff92f0111::OptionParser 81 while (isSeparator(Buffer[Pos])) in skipWhitespace() 82 ++Pos; in skipWhitespace() 86 const uintptr_t NameStart = Pos; in parseOption() 87 while (Buffer[Pos] != '=' && !isSeparatorOrNull(Buffer[Pos])) in parseOption() 88 ++Pos; in parseOption() 91 if (Buffer[Pos] != '=') { in parseOption() 96 const uintptr_t ValueStart = ++Pos; in parseOption() 98 if (Buffer[Pos] == '\'' || Buffer[Pos] == '"') { in parseOption() 99 const char Quote = Buffer[Pos++]; in parseOption() [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/AST/ |
| H A D | CommentParser.cpp | 50 Position Pos; member in clang::comments::TextTokenRetokenizer 53 return Pos.CurToken >= Toks.size(); in isEnd() 59 const Token &Tok = Toks[Pos.CurToken]; in setupBuffer() 61 Pos.BufferStart = Tok.getText().begin(); in setupBuffer() 62 Pos.BufferEnd = Tok.getText().end(); in setupBuffer() 63 Pos.BufferPtr = Pos.BufferStart; in setupBuffer() 64 Pos.BufferStartLoc = Tok.getLocation(); in setupBuffer() 68 const unsigned CharNo = Pos.BufferPtr - Pos.BufferStart; in getSourceLocation() 69 return Pos.BufferStartLoc.getLocWithOffset(CharNo); in getSourceLocation() 74 assert(Pos.BufferPtr != Pos.BufferEnd); in peek() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Mips/ |
| H A D | MipsBranchExpansion.cpp | 159 MachineBasicBlock::iterator Pos, DebugLoc DL); 379 MachineBasicBlock::iterator Pos, in buildProperJumpMI() argument 400 BuildMI(*MBB, Pos, DL, TII->get(JumpOp)).addReg(ATReg); in buildProperJumpMI() 413 MachineBasicBlock::iterator Pos; in expandToLongBranch() local 467 Pos = LongBrMBB->begin(); in expandToLongBranch() 469 BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::ADDiu), Mips::SP) in expandToLongBranch() 472 BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::SW)) in expandToLongBranch() 493 BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::LONG_BRANCH_LUi), Mips::AT) in expandToLongBranch() 505 LongBrMBB->insert(Pos, ADDiuInstr); in expandToLongBranch() 506 LongBrMBB->insert(Pos, BalInstr); in expandToLongBranch() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/MC/ |
| H A D | StringTableBuilder.cpp | 87 static int charTailAt(StringPair *P, size_t Pos) { in charTailAt() argument 89 if (Pos >= S.size()) in charTailAt() 91 return (unsigned char)S[S.size() - Pos - 1]; in charTailAt() 96 static void multikeySort(MutableArrayRef<StringPair *> Vec, int Pos) { in multikeySort() argument 104 int Pivot = charTailAt(Vec[0], Pos); in multikeySort() 108 int C = charTailAt(Vec[K], Pos); in multikeySort() 117 multikeySort(Vec.slice(0, I), Pos); in multikeySort() 118 multikeySort(Vec.slice(J), Pos); in multikeySort() 124 ++Pos; in multikeySort() 172 size_t Pos = Size - S.size() - (K != RAW); in finalizeStringTable() local [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | ContainerModeling.cpp | 577 const auto *Pos = getIteratorPosition(State, Iter); in handleInsert() local 578 if (!Pos) in handleInsert() 587 State = invalidateIteratorPositions(State, Pos->getOffset(), BO_GE); in handleInsert() 608 const auto *Pos = getIteratorPosition(State, Iter); in handleErase() local 609 if (!Pos) in handleErase() 619 State = invalidateIteratorPositions(State, Pos->getOffset(), BO_GE); in handleErase() 628 State = invalidateIteratorPositions(State, Pos->getOffset(), BO_EQ); in handleErase() 672 const auto *Pos = getIteratorPosition(State, Iter); in handleEraseAfter() local 673 if (!Pos) in handleEraseAfter() 683 nonloc::SymbolVal(Pos->getOffset()), in handleEraseAfter() [all …]
|
| H A D | IteratorRangeChecker.cpp | 71 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos); 72 bool isAheadOfRange(ProgramStateRef State, const IteratorPosition &Pos); 73 bool isBehindPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos); 198 const auto *Pos = getIteratorPosition(State, Val); in verifyDereference() local 199 if (Pos && isPastTheEnd(State, *Pos)) { in verifyDereference() 283 const auto *Pos = getIteratorPosition(C.getState(), Val); in reportBug() local 284 assert(Pos && "Iterator without known position cannot be out-of-range."); in reportBug() 287 R->markInteresting(Pos->getContainer()); in reportBug() 304 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos) { in isPastTheEnd() argument 305 const auto *Cont = Pos.getContainer(); in isPastTheEnd() [all …]
|
| H A D | IteratorModeling.cpp | 207 if (const auto *Pos = getIteratorPosition(State, Call.getArgSVal(0))) { in checkPostCall() local 208 State = setIteratorPosition(State, Call.getReturnValue(), *Pos); in checkPostCall() 227 if (const auto *Pos = getIteratorPosition(State, Call.getArgSVal(i))) { in checkPostCall() local 229 Pos->getContainer()); in checkPostCall() 239 const auto *Pos = getIteratorPosition(State, Val); in checkBind() local 240 if (Pos) { in checkBind() 241 State = setIteratorPosition(State, Loc, *Pos); in checkBind() 297 const auto *Pos = getIteratorPosition(State, C.getSVal(MTE->getSubExpr())); in checkPostStmt() local 298 if (!Pos) in checkPostStmt() 300 State = setIteratorPosition(State, C.getSVal(MTE), *Pos); in checkPostStmt() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/SandboxIR/ |
| H A D | Instruction.cpp | 288 VAArgInst *VAArgInst::create(Value *List, Type *Ty, InsertPosition Pos, in create() argument 290 auto &Builder = setInsertPos(Pos); in create() 300 FreezeInst *FreezeInst::create(Value *V, InsertPosition Pos, Context &Ctx, in create() argument 302 auto &Builder = setInsertPos(Pos); in create() 307 FenceInst *FenceInst::create(AtomicOrdering Ordering, InsertPosition Pos, in create() argument 309 auto &Builder = Instruction::setInsertPos(Pos); in create() 330 InsertPosition Pos, Context &Ctx, const Twine &Name) { in create() argument 331 auto &Builder = Instruction::setInsertPos(Pos); in create() 350 BranchInst *BranchInst::create(BasicBlock *IfTrue, InsertPosition Pos, in create() argument 352 auto &Builder = setInsertPos(Pos); in create() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/LineEditor/ |
| H A D | LineEditor.h | 106 size_t Pos) const; 121 virtual CompletionAction complete(StringRef Buffer, size_t Pos) const = 0; 126 CompletionAction complete(StringRef Buffer, size_t Pos) const override; 129 size_t Pos) const = 0; 135 CompletionAction complete(StringRef Buffer, size_t Pos) const override { in complete() 136 return Value(Buffer, Pos); in complete() 145 size_t Pos) const override { in getCompletions() 146 return Value(Buffer, Pos); in getCompletions()
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
| H A D | DataFlowSanitizer.cpp | 519 Value *getShadowAddress(Value *Addr, BasicBlock::iterator Pos); 520 Value *getShadowAddress(Value *Addr, BasicBlock::iterator Pos, 524 BasicBlock::iterator Pos); 541 Value *loadNextOrigin(BasicBlock::iterator Pos, Align OriginAlign, 653 BasicBlock::iterator Pos, ConstantInt *Zero = nullptr); 659 Value *combineShadows(Value *V1, Value *V2, BasicBlock::iterator Pos); 663 BasicBlock::iterator Pos); 675 BasicBlock::iterator Pos); 679 Value *Origin, BasicBlock::iterator Pos); 687 BasicBlock::iterator Pos); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/Utils/ |
| H A D | WebAssemblyUtilities.cpp | |
| /freebsd/contrib/llvm-project/libc/src/__support/CPP/ |
| H A D | string_view.h | 187 for (size_t Pos = From; Pos < size(); ++Pos) variable 188 if ((*this)[Pos] == c) 189 return Pos; 207 for (size_t Pos = From; Pos < size(); ++Pos) variable 208 if ((*this)[Pos] != c) 209 return Pos;
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/WebAssembly/ |
| H A D | WebAssemblyUtilities.cpp | 152 auto Pos = EHPad->begin(); in findCatch() local 155 while (Pos != EHPad->end() && in findCatch() 156 (Pos->isLabel() || Pos->isDebugInstr() || isMarker(Pos->getOpcode()))) in findCatch() 157 Pos++; in findCatch() 158 if (Pos != EHPad->end() && WebAssembly::isCatch(Pos->getOpcode())) in findCatch() 159 return &*Pos; in findCatch()
|
| /freebsd/contrib/llvm-project/llvm/lib/TableGen/ |
| H A D | TableGenBackend.cpp | 74 size_t Pos = (size_t)OS.tell(); in printLine() local 78 for (size_t i = (size_t)OS.tell() - Pos, e = MAX_LINE_LEN - Suffix.size(); in printLine() 92 size_t Pos = 0U; in emitSourceFileHeader() local 94 size_t Length = std::min(Desc.size() - Pos, MAX_LINE_LEN - PSLen); in emitSourceFileHeader() 95 printLine(OS, Prefix + Desc.substr(Pos, Length), ' ', Suffix); in emitSourceFileHeader() 96 Pos += Length; in emitSourceFileHeader() 97 } while (Pos < Desc.size()); in emitSourceFileHeader()
|