| /openbsd-src/gnu/llvm/llvm/include/llvm/Analysis/ |
| H A D | TargetLibraryInfo.def | 47 TLI_DEFINE_SIG_INTERNAL(Ptr, Int) 52 TLI_DEFINE_SIG_INTERNAL(Ptr, Int, Ptr) 57 TLI_DEFINE_SIG_INTERNAL(Ptr, LLong) 62 TLI_DEFINE_SIG_INTERNAL(Ptr, LLong, Ptr) 67 TLI_DEFINE_SIG_INTERNAL(Void, Ptr) 72 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr) 77 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Int) 82 TLI_DEFINE_SIG_INTERNAL(Void, Ptr) 87 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr) 92 TLI_DEFINE_SIG_INTERNAL(Void, Ptr, LLong) [all …]
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/gwp_asan/tests/ |
| H A D | recoverable.cpp | 32 void *Ptr = AllocateMemory(GPA); in TEST_P() local 33 DeallocateMemory(GPA, Ptr); in TEST_P() 35 DeallocateMemory(GPA, Ptr); in TEST_P() 42 DeallocateMemory(GPA, Ptr); in TEST_P() 49 char *Ptr = static_cast<char *>(AllocateMemory(GPA)); in TEST_P() local 51 DeallocateMemory(GPA, Ptr + 1); in TEST_P() 58 DeallocateMemory(GPA, Ptr + 1); in TEST_P() 65 void *Ptr = AllocateMemory(GPA); in TEST_P() local 66 DeallocateMemory(GPA, Ptr); in TEST_P() 68 TouchMemory(Ptr); in TEST_P() [all …]
|
| H A D | slot_reuse.cpp | 14 void *Ptr = GPA->allocate(1); in singleByteGoodAllocDealloc() local 15 EXPECT_NE(nullptr, Ptr); in singleByteGoodAllocDealloc() 16 EXPECT_TRUE(GPA->pointerIsMine(Ptr)); in singleByteGoodAllocDealloc() 17 EXPECT_EQ(1u, GPA->getSize(Ptr)); in singleByteGoodAllocDealloc() 18 GPA->deallocate(Ptr); in singleByteGoodAllocDealloc() 48 void *Ptr = GPA->allocate(1); in runNoReuseBeforeNecessary() local 50 EXPECT_TRUE(GPA->pointerIsMine(Ptr)); in runNoReuseBeforeNecessary() 51 EXPECT_EQ(0u, Ptrs.count(Ptr)); in runNoReuseBeforeNecessary() 53 Ptrs.insert(Ptr); in runNoReuseBeforeNecessary() 54 GPA->deallocate(Ptr); in runNoReuseBeforeNecessary()
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/scudo/standalone/ |
| H A D | memtag.h | 37 inline uptr untagPointer(uptr Ptr) { return Ptr & ((1ULL << 56) - 1); } in untagPointer() argument 39 inline uint8_t extractTag(uptr Ptr) { return (Ptr >> 56) & 0xf; } in extractTag() argument 49 inline NORETURN uptr untagPointer(uptr Ptr) { 50 (void)Ptr; 54 inline NORETURN uint8_t extractTag(uptr Ptr) { 55 (void)Ptr; 148 inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) { in selectRandomTag() argument 157 : [Ptr] "r"(Ptr), [ExcludeMask] "r"(ExcludeMask)); in selectRandomTag() 161 inline uptr addFixedTag(uptr Ptr, uptr Tag) { in addFixedTag() argument 163 DCHECK_EQ(untagPointer(Ptr), Ptr); in addFixedTag() [all …]
|
| H A D | chunk.h | 91 inline AtomicPackedHeader *getAtomicHeader(void *Ptr) { in getAtomicHeader() argument 92 return reinterpret_cast<AtomicPackedHeader *>(reinterpret_cast<uptr>(Ptr) - in getAtomicHeader() 96 inline const AtomicPackedHeader *getConstAtomicHeader(const void *Ptr) { in getConstAtomicHeader() argument 98 reinterpret_cast<uptr>(Ptr) - getHeaderSize()); in getConstAtomicHeader() 104 static inline u16 computeHeaderChecksum(u32 Cookie, const void *Ptr, in computeHeaderChecksum() argument 110 return computeChecksum(Cookie, reinterpret_cast<uptr>(Ptr), HeaderHolder, in computeHeaderChecksum() 114 inline void storeHeader(u32 Cookie, void *Ptr, in storeHeader() argument 117 computeHeaderChecksum(Cookie, Ptr, NewUnpackedHeader); in storeHeader() 119 atomic_store_relaxed(getAtomicHeader(Ptr), NewPackedHeader); in storeHeader() 122 inline void loadHeader(u32 Cookie, const void *Ptr, in loadHeader() argument [all …]
|
| H A D | combined.h | 64 void recycle(void *Ptr) { in recycle() 66 Chunk::loadHeader(Allocator.Cookie, Ptr, &Header); in recycle() 68 reportInvalidChunkState(AllocatorAction::Recycling, Ptr); in recycle() 72 Chunk::compareExchangeHeader(Allocator.Cookie, Ptr, &NewHeader, &Header); in recycle() 75 Ptr = untagPointer(Ptr); in recycle() 76 void *BlockBegin = Allocator::getBlockBegin(Ptr, &NewHeader); in recycle() 86 void *Ptr = Cache.allocate(QuarantineClassId); in allocate() local 88 if (UNLIKELY(!Ptr)) in allocate() 91 Ptr = reinterpret_cast<void *>(reinterpret_cast<uptr>(Ptr) + in allocate() 97 Chunk::storeHeader(Allocator.Cookie, Ptr, &Header); in allocate() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/Support/ |
| H A D | Twine.cpp | 57 void Twine::printOneChild(raw_ostream &OS, Child Ptr, in printOneChild() argument 63 Ptr.twine->print(OS); in printOneChild() 66 OS << Ptr.cString; in printOneChild() 69 OS << *Ptr.stdString; in printOneChild() 72 OS << StringRef(Ptr.ptrAndLength.ptr, Ptr.ptrAndLength.length); in printOneChild() 75 OS << *Ptr.formatvObject; in printOneChild() 78 OS << Ptr.character; in printOneChild() 81 OS << Ptr.decUI; in printOneChild() 84 OS << Ptr.decI; in printOneChild() 87 OS << *Ptr.decUL; in printOneChild() [all …]
|
| H A D | FormattedStream.cpp | 26 void formatted_raw_ostream::UpdatePosition(const char *Ptr, size_t Size) { in UpdatePosition() argument 61 PartialUTF8Char.append(StringRef(Ptr, Size)); in UpdatePosition() 67 PartialUTF8Char.append(StringRef(Ptr, BytesFromBuffer)); in UpdatePosition() 70 Ptr += BytesFromBuffer; in UpdatePosition() 77 for (const char *End = Ptr + Size; Ptr < End; Ptr += NumBytes) { in UpdatePosition() 78 NumBytes = getNumBytesForUTF8(*Ptr); in UpdatePosition() 85 if ((unsigned)(End - Ptr) < NumBytes) { in UpdatePosition() 86 PartialUTF8Char = StringRef(Ptr, End - Ptr); in UpdatePosition() 90 ProcessUTF8CodePoint(StringRef(Ptr, NumBytes)); in UpdatePosition() 96 void formatted_raw_ostream::ComputePosition(const char *Ptr, size_t Size) { in ComputePosition() argument [all …]
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/memprof/ |
| H A D | memprof_rawprofile.cpp | 59 char *Ptr = Buffer; in SerializeSegmentsToBuffer() local 61 Ptr += sizeof(u64); in SerializeSegmentsToBuffer() 70 memcpy(Ptr, &Entry, sizeof(SegmentEntry)); in SerializeSegmentsToBuffer() 71 Ptr += sizeof(SegmentEntry); in SerializeSegmentsToBuffer() 78 CHECK(ExpectedNumBytes >= static_cast<u64>(Ptr - Buffer) && in SerializeSegmentsToBuffer() 113 char *Ptr = Buffer; in SerializeStackToBuffer() local 114 Ptr = WriteBytes(static_cast<u64>(NumIds), Ptr); in SerializeStackToBuffer() 118 Ptr = WriteBytes(Id, Ptr); in SerializeStackToBuffer() 119 Ptr += sizeof(u64); // Bump it by u64, we will fill this in later. in SerializeStackToBuffer() 126 Ptr = WriteBytes(static_cast<u64>(pc), Ptr); in SerializeStackToBuffer() [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/AST/Interp/ |
| H A D | Interp.cpp | 101 static bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckInitialized() argument 103 if (Ptr.isInitialized()) in CheckInitialized() 112 static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckActive() argument 114 if (Ptr.isActive()) in CheckActive() 118 const FieldDecl *InactiveField = Ptr.getField(); in CheckActive() 121 Pointer U = Ptr.getBase(); in CheckActive() 144 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument 146 if (auto ID = Ptr.getDeclID()) { in CheckTemporary() 147 if (!Ptr.isStaticTemporary()) in CheckTemporary() 150 if (Ptr.getDeclDesc()->getType().isConstQualified()) in CheckTemporary() [all …]
|
| H A D | Source.h | 28 CodePtr() : Ptr(nullptr) {} in CodePtr() 31 Ptr += Offset; 36 assert(Ptr != nullptr && RHS.Ptr != nullptr && "Invalid code pointer"); 37 return Ptr - RHS.Ptr; 41 assert(Ptr != nullptr && "Invalid code pointer"); 42 return CodePtr(Ptr - RHS); 45 bool operator!=(const CodePtr &RHS) const { return Ptr != RHS.Ptr; } 47 operator bool() const { return Ptr; } 51 assert(aligned(Ptr)); in read() 53 T Value = endian::read<T, endianness::native, 1>(Ptr); in read() [all …]
|
| H A D | Interp.h | 48 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 51 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 54 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 57 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 61 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 65 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, 69 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 72 bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 75 bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr); 78 bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr); [all …]
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/gwp_asan/platform_specific/ |
| H A D | guarded_pool_allocator_posix.cpp | 47 void *Ptr = mmap(nullptr, Size, PROT_READ | PROT_WRITE, in map() local 49 Check(Ptr != MAP_FAILED, "Failed to map guarded pool allocator memory"); in map() 50 MaybeSetMappingName(Ptr, Size, Name); in map() 51 return Ptr; in map() 54 void GuardedPoolAllocator::unmap(void *Ptr, size_t Size) const { in unmap() argument 55 assert((reinterpret_cast<uintptr_t>(Ptr) % State.PageSize) == 0); in unmap() 57 Check(munmap(Ptr, Size) == 0, in unmap() 63 void *Ptr = in reserveGuardedPool() local 65 Check(Ptr != MAP_FAILED, "Failed to reserve guarded pool allocator memory"); in reserveGuardedPool() 66 MaybeSetMappingName(Ptr, Size, kGwpAsanGuardPageName); in reserveGuardedPool() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/ObjCopy/XCOFF/ |
| H A D | XCOFFWriter.cpp | 56 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local 57 memcpy(Ptr, &Obj.FileHeader, sizeof(XCOFFFileHeader32)); in writeHeaders() 58 Ptr += sizeof(XCOFFFileHeader32); in writeHeaders() 62 memcpy(Ptr, &Obj.OptionalFileHeader, Obj.FileHeader.AuxHeaderSize); in writeHeaders() 63 Ptr += Obj.FileHeader.AuxHeaderSize; in writeHeaders() 68 memcpy(Ptr, &Sec.SectionHeader, sizeof(XCOFFSectionHeader32)); in writeHeaders() 69 Ptr += sizeof(XCOFFSectionHeader32); in writeHeaders() 76 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local 78 Ptr = std::copy(Sec.Contents.begin(), Sec.Contents.end(), Ptr); in writeSections() 83 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + in writeSections() local [all …]
|
| /openbsd-src/gnu/llvm/clang/include/clang/Sema/ |
| H A D | IdentifierResolver.h | 83 uintptr_t Ptr = 0; variable 88 Ptr = reinterpret_cast<uintptr_t>(D); in iterator() 89 assert((Ptr & 0x1) == 0 && "Invalid Ptr!"); in iterator() 95 Ptr = reinterpret_cast<uintptr_t>(I) | 0x1; in iterator() 98 bool isIterator() const { return (Ptr & 0x1); } in isIterator() 102 return reinterpret_cast<BaseIter>(Ptr & ~0x1); in getIterator() 114 return reinterpret_cast<NamedDecl*>(Ptr); 118 return Ptr == RHS.Ptr; 121 return Ptr != RHS.Ptr; 127 Ptr = 0; [all …]
|
| /openbsd-src/gnu/llvm/clang/lib/Sema/ |
| H A D | IdentifierResolver.cpp | 155 void *Ptr = Name.getFETokenInfo(); in AddDecl() local 157 if (!Ptr) { in AddDecl() 164 if (isDeclPtr(Ptr)) { in AddDecl() 167 NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr); in AddDecl() 170 IDI = toIdDeclInfo(Ptr); in AddDecl() 180 void *Ptr = Name.getFETokenInfo(); in InsertDeclAfter() local 182 if (!Ptr) { in InsertDeclAfter() 187 if (isDeclPtr(Ptr)) { in InsertDeclAfter() 192 NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr); in InsertDeclAfter() 206 IdDeclInfo *IDI = toIdDeclInfo(Ptr); in InsertDeclAfter() [all …]
|
| /openbsd-src/gnu/llvm/llvm/lib/ObjCopy/COFF/ |
| H A D | COFFWriter.cpp | 255 uint8_t *Ptr = reinterpret_cast<uint8_t *>(Buf->getBufferStart()); in writeHeaders() local 257 memcpy(Ptr, &Obj.DosHeader, sizeof(Obj.DosHeader)); in writeHeaders() 258 Ptr += sizeof(Obj.DosHeader); in writeHeaders() 259 memcpy(Ptr, Obj.DosStub.data(), Obj.DosStub.size()); in writeHeaders() 260 Ptr += Obj.DosStub.size(); in writeHeaders() 261 memcpy(Ptr, PEMagic, sizeof(PEMagic)); in writeHeaders() 262 Ptr += sizeof(PEMagic); in writeHeaders() 265 memcpy(Ptr, &Obj.CoffFileHeader, sizeof(Obj.CoffFileHeader)); in writeHeaders() 266 Ptr += sizeof(Obj.CoffFileHeader); in writeHeaders() 288 memcpy(Ptr, &BigObjHeader, sizeof(BigObjHeader)); in writeHeaders() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/Support/ |
| H A D | SMLoc.h | 24 const char *Ptr = nullptr; variable 29 bool isValid() const { return Ptr != nullptr; } in isValid() 31 bool operator==(const SMLoc &RHS) const { return RHS.Ptr == Ptr; } 32 bool operator!=(const SMLoc &RHS) const { return RHS.Ptr != Ptr; } 34 const char *getPointer() const { return Ptr; } in getPointer() 36 static SMLoc getFromPointer(const char *Ptr) { in getFromPointer() argument 38 L.Ptr = Ptr; in getFromPointer()
|
| H A D | ManagedStatic.h | 29 static void call(void *Ptr) { delete (T *)Ptr; } in call() 32 static void call(void *Ptr) { delete[](T *)Ptr; } 52 mutable std::atomic<void *> Ptr{}; 58 mutable std::atomic<void *> Ptr; 71 bool isConstructed() const { return Ptr != nullptr; } 87 void *Tmp = Ptr.load(std::memory_order_acquire); 91 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed)); 97 void *Tmp = Ptr.load(std::memory_order_acquire); 101 return *static_cast<C *>(Ptr.load(std::memory_order_relaxed)); 109 return static_cast<C *>(Ptr.exchange(nullptr));
|
| /openbsd-src/gnu/llvm/compiler-rt/lib/gwp_asan/ |
| H A D | common.cpp | 81 bool AllocatorState::isGuardPage(uintptr_t Ptr) const { in isGuardPage() 82 assert(pointerIsMine(reinterpret_cast<void *>(Ptr))); in isGuardPage() 83 size_t PageOffsetFromPoolStart = (Ptr - GuardedPagePool) / PageSize; in isGuardPage() 88 static size_t addrToSlot(const AllocatorState *State, uintptr_t Ptr) { in addrToSlot() argument 89 size_t ByteOffsetFromPoolStart = Ptr - State->GuardedPagePool; in addrToSlot() 94 size_t AllocatorState::getNearestSlot(uintptr_t Ptr) const { in getNearestSlot() 95 if (Ptr <= GuardedPagePool + PageSize) in getNearestSlot() 97 if (Ptr > GuardedPagePoolEnd - PageSize) in getNearestSlot() 100 if (!isGuardPage(Ptr)) in getNearestSlot() 101 return addrToSlot(this, Ptr); in getNearestSlot() [all …]
|
| H A D | guarded_pool_allocator.cpp | 34 uintptr_t getPageAddr(uintptr_t Ptr, uintptr_t PageSize) { in getPageAddr() argument 35 return Ptr & ~(PageSize - 1); in getPageAddr() 181 uintptr_t GuardedPoolAllocator::alignUp(uintptr_t Ptr, size_t Alignment) { in alignUp() argument 184 if ((Ptr & (Alignment - 1)) == 0) in alignUp() 185 return Ptr; in alignUp() 187 Ptr += Alignment - (Ptr & (Alignment - 1)); in alignUp() 188 return Ptr; in alignUp() 191 uintptr_t GuardedPoolAllocator::alignDown(uintptr_t Ptr, size_t Alignment) { in alignDown() argument 194 if ((Ptr & (Alignment - 1)) == 0) in alignDown() 195 return Ptr; in alignDown() [all …]
|
| H A D | guarded_pool_allocator.h | 88 GWP_ASAN_ALWAYS_INLINE bool pointerIsMine(const void *Ptr) const { in pointerIsMine() argument 89 return State.pointerIsMine(Ptr); in pointerIsMine() 102 void deallocate(void *Ptr); 105 size_t getSize(const void *Ptr); 116 void preCrashReport(void *Ptr); 117 void postCrashReportRecoverableOnly(void *Ptr); 128 static uintptr_t alignUp(uintptr_t Ptr, size_t Alignment); 129 static uintptr_t alignDown(uintptr_t Ptr, size_t Alignment); 152 void unmap(void *Ptr, size_t Size) const; 165 void allocateInGuardedPool(void *Ptr, size_t Size) const; [all …]
|
| /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.jason/ |
| H A D | scoping4.C | 7 typedef char * Ptr; typedef 8 Ptr s; 9 Ptr get_string(); 10 A(Ptr string); // { s = string; }; 15 typedef A * Ptr; typedef 16 Ptr a; 17 Ptr get_A(); 18 B(Ptr a_ptr); 21 A::A(Ptr string) { // gets bogus error - in A()
|
| /openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/ |
| H A D | AMDGPUPromoteKernelArguments.cpp | 41 void enqueueUsers(Value *Ptr); 43 bool promotePointer(Value *Ptr); 65 void AMDGPUPromoteKernelArguments::enqueueUsers(Value *Ptr) { in enqueueUsers() argument 66 SmallVector<User *> PtrUsers(Ptr->users()); in enqueueUsers() 78 if (LD->getPointerOperand()->stripInBoundsOffsets() == Ptr && in enqueueUsers() 87 if (U->getOperand(0)->stripInBoundsOffsets() == Ptr) in enqueueUsers() 94 bool AMDGPUPromoteKernelArguments::promotePointer(Value *Ptr) { in promotePointer() argument 97 LoadInst *LI = dyn_cast<LoadInst>(Ptr); in promotePointer() 101 PointerType *PT = dyn_cast<PointerType>(Ptr->getType()); in promotePointer() 108 enqueueUsers(Ptr); in promotePointer() [all …]
|
| /openbsd-src/gnu/llvm/llvm/include/llvm/ADT/ |
| H A D | SmallPtrSet.h | 126 std::pair<const void *const *, bool> insert_imp(const void *Ptr) { in insert_imp() argument 133 if (Value == Ptr) in insert_imp() 141 *LastTombstone = Ptr; in insert_imp() 149 SmallArray[NumNonEmpty++] = Ptr; in insert_imp() 155 return insert_imp_big(Ptr); in insert_imp() 162 bool erase_imp(const void * Ptr) { in erase_imp() argument 163 const void *const *P = find_imp(Ptr); in erase_imp() 168 assert(*Loc == Ptr && "broken find!"); in erase_imp() 177 const void *const * find_imp(const void * Ptr) const { in find_imp() argument 182 if (*APtr == Ptr) in find_imp() [all …]
|