Home
last modified time | relevance | path

Searched refs:BufPtr (Results 1 – 25 of 41) sorted by relevance

12

/external/llvm/include/llvm/Bitcode/
DReaderWriter.h116 inline bool isBitcodeWrapper(const unsigned char *BufPtr, in isBitcodeWrapper() argument
120 return BufPtr != BufEnd && in isBitcodeWrapper()
121 BufPtr[0] == 0xDE && in isBitcodeWrapper()
122 BufPtr[1] == 0xC0 && in isBitcodeWrapper()
123 BufPtr[2] == 0x17 && in isBitcodeWrapper()
124 BufPtr[3] == 0x0B; in isBitcodeWrapper()
130 inline bool isRawBitcode(const unsigned char *BufPtr, in isRawBitcode() argument
134 return BufPtr != BufEnd && in isRawBitcode()
135 BufPtr[0] == 'B' && in isRawBitcode()
136 BufPtr[1] == 'C' && in isRawBitcode()
[all …]
/external/llvm-project/llvm/include/llvm/Bitcode/
DBitcodeReader.h199 inline bool isBitcodeWrapper(const unsigned char *BufPtr, in isBitcodeWrapper() argument
203 return BufPtr != BufEnd && in isBitcodeWrapper()
204 BufPtr[0] == 0xDE && in isBitcodeWrapper()
205 BufPtr[1] == 0xC0 && in isBitcodeWrapper()
206 BufPtr[2] == 0x17 && in isBitcodeWrapper()
207 BufPtr[3] == 0x0B; in isBitcodeWrapper()
212 inline bool isRawBitcode(const unsigned char *BufPtr, in isRawBitcode() argument
216 return BufPtr != BufEnd && in isRawBitcode()
217 BufPtr[0] == 'B' && in isRawBitcode()
218 BufPtr[1] == 'C' && in isRawBitcode()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Bitcode/
DBitcodeReader.h191 inline bool isBitcodeWrapper(const unsigned char *BufPtr, in isBitcodeWrapper() argument
195 return BufPtr != BufEnd && in isBitcodeWrapper()
196 BufPtr[0] == 0xDE && in isBitcodeWrapper()
197 BufPtr[1] == 0xC0 && in isBitcodeWrapper()
198 BufPtr[2] == 0x17 && in isBitcodeWrapper()
199 BufPtr[3] == 0x0B; in isBitcodeWrapper()
204 inline bool isRawBitcode(const unsigned char *BufPtr, in isRawBitcode() argument
208 return BufPtr != BufEnd && in isRawBitcode()
209 BufPtr[0] == 'B' && in isRawBitcode()
210 BufPtr[1] == 'C' && in isRawBitcode()
[all …]
/external/swiftshader/third_party/subzero/pnacl-llvm/
DNaClBitcodeHeader.cpp177 bool NaClBitcodeHeader::ReadPrefix(const unsigned char *BufPtr, in ReadPrefix() argument
181 if (!isNaClBitcode(BufPtr, BufEnd)) { in ReadPrefix()
183 if (isBitcode(BufPtr, BufEnd)) { in ReadPrefix()
189 BufPtr += WordSize; in ReadPrefix()
192 if (BufPtr + WordSize > BufEnd) in ReadPrefix()
194 NumFields = static_cast<unsigned>(BufPtr[0]) | in ReadPrefix()
195 (static_cast<unsigned>(BufPtr[1]) << 8); in ReadPrefix()
196 NumBytes = static_cast<unsigned>(BufPtr[2]) | in ReadPrefix()
197 (static_cast<unsigned>(BufPtr[3]) << 8); in ReadPrefix()
198 BufPtr += WordSize; in ReadPrefix()
[all …]
/external/swiftshader/third_party/subzero/pnacl-llvm/include/llvm/Bitcode/NaCl/
DNaClReaderWriter.h117 inline bool isNaClBitcode(const unsigned char *BufPtr, in isNaClBitcode() argument
119 return BufPtr + 4 <= BufEnd && BufPtr[0] == 'P' && BufPtr[1] == 'E' && in isNaClBitcode()
120 BufPtr[2] == 'X' && BufPtr[3] == 'E'; in isNaClBitcode()
DNaClBitcodeHeader.h196 bool Read(const unsigned char *BufPtr, const unsigned char *BufEnd);
240 bool ReadPrefix(const unsigned char *BufPtr, const unsigned char *BufEnd,
245 bool ReadFields(const unsigned char *BufPtr, const unsigned char *BufEnd,
/external/llvm/include/llvm/ADT/
DStringExtras.h49 char *BufPtr = std::end(Buffer);
51 if (X == 0) *--BufPtr = '0';
55 *--BufPtr = hexdigit(Mod, LowerCase);
59 return std::string(BufPtr, std::end(Buffer));
80 char *BufPtr = std::end(Buffer);
82 if (X == 0) *--BufPtr = '0'; // Handle special case...
85 *--BufPtr = '0' + char(X % 10);
89 if (isNeg) *--BufPtr = '-'; // Add negative sign...
90 return std::string(BufPtr, std::end(Buffer));
/external/swiftshader/third_party/llvm-subzero/include/llvm/ADT/
DStringExtras.h50 char *BufPtr = std::end(Buffer);
52 if (X == 0) *--BufPtr = '0';
56 *--BufPtr = hexdigit(Mod, LowerCase);
60 return std::string(BufPtr, std::end(Buffer));
81 char *BufPtr = std::end(Buffer);
83 if (X == 0) *--BufPtr = '0'; // Handle special case...
86 *--BufPtr = '0' + char(X % 10);
90 if (isNeg) *--BufPtr = '-'; // Add negative sign...
91 return std::string(BufPtr, std::end(Buffer));
/external/clang/unittests/libclang/
DLibclangTest.cpp61 char *BufPtr; in ~TestVFO() local
63 clang_VirtualFileOverlay_writeToBuffer(VFO, 0, &BufPtr, &BufSize); in ~TestVFO()
64 std::string BufStr(BufPtr, BufSize); in ~TestVFO()
66 clang_free(BufPtr); in ~TestVFO()
343 char *BufPtr; in TEST() local
345 clang_ModuleMapDescriptor_writeToBuffer(MMD, 0, &BufPtr, &BufSize); in TEST()
346 std::string BufStr(BufPtr, BufSize); in TEST()
348 clang_free(BufPtr); in TEST()
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/
DStringExtras.h126 char *BufPtr = std::end(Buffer);
128 if (X == 0) *--BufPtr = '0';
132 *--BufPtr = hexdigit(Mod, LowerCase);
136 return std::string(BufPtr, std::end(Buffer));
225 char *BufPtr = std::end(Buffer);
227 if (X == 0) *--BufPtr = '0'; // Handle special case...
230 *--BufPtr = '0' + char(X % 10);
234 if (isNeg) *--BufPtr = '-'; // Add negative sign...
235 return std::string(BufPtr, std::end(Buffer));
/external/llvm-project/llvm/include/llvm/ADT/
DStringExtras.h146 char *BufPtr = std::end(Buffer);
148 if (X == 0) *--BufPtr = '0';
152 *--BufPtr = hexdigit(Mod, LowerCase);
156 return std::string(BufPtr, std::end(Buffer));
279 char *BufPtr = std::end(Buffer);
281 if (X == 0) *--BufPtr = '0'; // Handle special case...
284 *--BufPtr = '0' + char(X % 10);
288 if (isNeg) *--BufPtr = '-'; // Add negative sign...
289 return std::string(BufPtr, std::end(Buffer));
/external/llvm/include/llvm/Support/
DYAMLTraits.h891 : io(i_o), BufPtr(nullptr), Result(Obj) {
893 BufPtr = new (&Buffer) TNorm(io, Obj);
896 BufPtr = new (&Buffer) TNorm(io);
902 Result = BufPtr->denormalize(io);
904 BufPtr->~TNorm();
907 TNorm* operator->() { return BufPtr; }
914 TNorm *BufPtr;
924 : io(i_o), BufPtr(nullptr), Result(Obj) {
926 BufPtr = new (&Buffer) TNorm(io, Obj);
929 BufPtr = allocator->Allocate<TNorm>();
[all …]
/external/clang/lib/Lex/
DMacroArgs.cpp236 const char *BufPtr = Result.data() + CurStrLen; in StringifyArgument() local
238 unsigned ActualTokLen = PP.getSpelling(Tok, BufPtr, &Invalid); in StringifyArgument()
243 if (ActualTokLen && BufPtr != &Result[CurStrLen]) in StringifyArgument()
244 memcpy(&Result[CurStrLen], BufPtr, ActualTokLen); in StringifyArgument()
DTokenLexer.cpp550 const char *BufPtr = &Buffer[0]; in PasteTokens() local
552 unsigned LHSLen = PP.getSpelling(Tok, BufPtr, &Invalid); in PasteTokens()
553 if (BufPtr != &Buffer[0]) // Really, we want the chars in Buffer! in PasteTokens()
554 memcpy(&Buffer[0], BufPtr, LHSLen); in PasteTokens()
558 BufPtr = Buffer.data() + LHSLen; in PasteTokens()
559 unsigned RHSLen = PP.getSpelling(RHS, BufPtr, &Invalid); in PasteTokens()
562 if (RHSLen && BufPtr != &Buffer[LHSLen]) in PasteTokens()
564 memcpy(&Buffer[LHSLen], BufPtr, RHSLen); in PasteTokens()
DLexer.cpp55 void Lexer::InitLexer(const char *BufStart, const char *BufPtr, in InitLexer() argument
58 BufferPtr = BufPtr; in InitLexer()
132 const char *BufStart, const char *BufPtr, const char *BufEnd) in Lexer() argument
135 InitLexer(BufStart, BufPtr, BufEnd); in Lexer()
231 static size_t getSpellingSlow(const Token &Tok, const char *BufPtr, in getSpellingSlow() argument
236 const char *BufEnd = BufPtr + Tok.getLength(); in getSpellingSlow()
240 while (BufPtr < BufEnd) { in getSpellingSlow()
242 Spelling[Length++] = Lexer::getCharAndSizeNoWarn(BufPtr, Size, LangOpts); in getSpellingSlow()
243 BufPtr += Size; in getSpellingSlow()
258 size_t RawLength = RawEnd - BufPtr + 1; in getSpellingSlow()
[all …]
/external/llvm-project/clang/lib/Lex/
DMacroArgs.cpp250 const char *BufPtr = Result.data() + CurStrLen; in StringifyArgument() local
252 unsigned ActualTokLen = PP.getSpelling(Tok, BufPtr, &Invalid); in StringifyArgument()
257 if (ActualTokLen && BufPtr != &Result[CurStrLen]) in StringifyArgument()
258 memcpy(&Result[CurStrLen], BufPtr, ActualTokLen); in StringifyArgument()
DTokenLexer.cpp773 const char *BufPtr = &Buffer[0]; in pasteTokens() local
775 unsigned LHSLen = PP.getSpelling(LHSTok, BufPtr, &Invalid); in pasteTokens()
776 if (BufPtr != &Buffer[0]) // Really, we want the chars in Buffer! in pasteTokens()
777 memcpy(&Buffer[0], BufPtr, LHSLen); in pasteTokens()
781 BufPtr = Buffer.data() + LHSLen; in pasteTokens()
782 unsigned RHSLen = PP.getSpelling(RHS, BufPtr, &Invalid); in pasteTokens()
785 if (RHSLen && BufPtr != &Buffer[LHSLen]) in pasteTokens()
787 memcpy(&Buffer[LHSLen], BufPtr, RHSLen); in pasteTokens()
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DYAMLTraits.h979 : io(i_o), BufPtr(nullptr), Result(Obj) {
981 BufPtr = new (&Buffer) TNorm(io, Obj);
984 BufPtr = new (&Buffer) TNorm(io);
990 Result = BufPtr->denormalize(io);
992 BufPtr->~TNorm();
995 TNorm* operator->() { return BufPtr; }
1002 TNorm *BufPtr;
1012 : io(i_o), BufPtr(nullptr), Result(Obj) {
1014 BufPtr = new (&Buffer) TNorm(io, Obj);
1017 BufPtr = allocator->Allocate<TNorm>();
[all …]
/external/llvm/lib/Support/
DMemoryBuffer.cpp385 char *BufPtr = const_cast<char *>(Buf->getBufferStart()); in getOpenFileImpl() local
395 ssize_t NumRead = ::pread(FD, BufPtr, BytesLeft, MapSize-BytesLeft+Offset); in getOpenFileImpl()
397 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft); in getOpenFileImpl()
406 memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer. in getOpenFileImpl()
410 BufPtr += NumRead; in getOpenFileImpl()
/external/llvm/tools/llvm-bcanalyzer/
Dllvm-bcanalyzer.cpp710 const unsigned char *BufPtr = (const unsigned char *)MemBuf->getBufferStart(); in openBitcodeFile() local
711 const unsigned char *EndBufPtr = BufPtr + MemBuf->getBufferSize(); in openBitcodeFile()
715 if (isBitcodeWrapper(BufPtr, EndBufPtr)) { in openBitcodeFile()
720 unsigned Magic = support::endian::read32le(&BufPtr[BWH_MagicField]); in openBitcodeFile()
721 unsigned Version = support::endian::read32le(&BufPtr[BWH_VersionField]); in openBitcodeFile()
722 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]); in openBitcodeFile()
723 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]); in openBitcodeFile()
724 unsigned CPUType = support::endian::read32le(&BufPtr[BWH_CPUTypeField]); in openBitcodeFile()
734 if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr, true)) in openBitcodeFile()
738 StreamFile = BitstreamReader(BufPtr, EndBufPtr); in openBitcodeFile()
/external/swiftshader/third_party/llvm-subzero/lib/Support/
DMemoryBuffer.cpp385 char *BufPtr = const_cast<char *>(Buf->getBufferStart()); in getOpenFileImpl() local
395 ssize_t NumRead = ::pread(FD, BufPtr, BytesLeft, MapSize-BytesLeft+Offset); in getOpenFileImpl()
397 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft); in getOpenFileImpl()
406 memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer. in getOpenFileImpl()
410 BufPtr += NumRead; in getOpenFileImpl()
/external/llvm-project/clang/unittests/libclang/
DLibclangTest.cpp66 char *BufPtr; in ~TestVFO() local
68 clang_VirtualFileOverlay_writeToBuffer(VFO, 0, &BufPtr, &BufSize); in ~TestVFO()
69 std::string BufStr(BufPtr, BufSize); in ~TestVFO()
71 clang_free(BufPtr); in ~TestVFO()
348 char *BufPtr; in TEST() local
350 clang_ModuleMapDescriptor_writeToBuffer(MMD, 0, &BufPtr, &BufSize); in TEST()
351 std::string BufStr(BufPtr, BufSize); in TEST()
353 clang_free(BufPtr); in TEST()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Bitcode/Reader/
DBitcodeAnalyzer.cpp463 const unsigned char *BufPtr = (const unsigned char *)Bytes.data(); in analyzeHeader() local
464 const unsigned char *EndBufPtr = BufPtr + Bytes.size(); in analyzeHeader()
468 if (isBitcodeWrapper(BufPtr, EndBufPtr)) { in analyzeHeader()
473 unsigned Magic = support::endian::read32le(&BufPtr[BWH_MagicField]); in analyzeHeader()
474 unsigned Version = support::endian::read32le(&BufPtr[BWH_VersionField]); in analyzeHeader()
475 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]); in analyzeHeader()
476 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]); in analyzeHeader()
477 unsigned CPUType = support::endian::read32le(&BufPtr[BWH_CPUTypeField]); in analyzeHeader()
487 if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr, true)) in analyzeHeader()
492 Stream = BitstreamCursor(ArrayRef<uint8_t>(BufPtr, EndBufPtr)); in analyzeHeader()
/external/llvm-project/llvm/lib/Bitcode/Reader/
DBitcodeAnalyzer.cpp470 const unsigned char *BufPtr = (const unsigned char *)Bytes.data(); in analyzeHeader() local
471 const unsigned char *EndBufPtr = BufPtr + Bytes.size(); in analyzeHeader()
475 if (isBitcodeWrapper(BufPtr, EndBufPtr)) { in analyzeHeader()
480 unsigned Magic = support::endian::read32le(&BufPtr[BWH_MagicField]); in analyzeHeader()
481 unsigned Version = support::endian::read32le(&BufPtr[BWH_VersionField]); in analyzeHeader()
482 unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]); in analyzeHeader()
483 unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]); in analyzeHeader()
484 unsigned CPUType = support::endian::read32le(&BufPtr[BWH_CPUTypeField]); in analyzeHeader()
494 if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr, true)) in analyzeHeader()
499 Stream = BitstreamCursor(ArrayRef<uint8_t>(BufPtr, EndBufPtr)); in analyzeHeader()
/external/capstone/arch/AArch64/
DAArch64BaseInfo.c84 char *BufPtr = Buffer+21; in utostr() local
88 if (X == 0) *--BufPtr = '0'; // Handle special case... in utostr()
91 *--BufPtr = X % 10 + '0'; in utostr()
95 if (isNeg) *--BufPtr = '-'; // Add negative sign... in utostr()
97 result = cs_strdup(BufPtr); in utostr()

12