Home | History | Annotate | Download | only in IR

Lines Matching refs:Ctx

20 MDNode *DebugLoc::getScope(const LLVMContext &Ctx) const {
26 assert(unsigned(ScopeIdx) <= Ctx.pImpl->ScopeRecords.size() &&
28 return Ctx.pImpl->ScopeRecords[ScopeIdx-1].get();
32 assert(unsigned(-ScopeIdx) <= Ctx.pImpl->ScopeInlinedAtRecords.size() &&
34 return Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].first.get();
37 MDNode *DebugLoc::getInlinedAt(const LLVMContext &Ctx) const {
43 assert(unsigned(-ScopeIdx) <= Ctx.pImpl->ScopeInlinedAtRecords.size() &&
45 return Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].second.get();
50 const LLVMContext &Ctx) const {
59 assert(unsigned(ScopeIdx) <= Ctx.pImpl->ScopeRecords.size() &&
61 Scope = Ctx.pImpl->ScopeRecords[ScopeIdx-1].get();
67 assert(unsigned(-ScopeIdx) <= Ctx.pImpl->ScopeInlinedAtRecords.size() &&
69 Scope = Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].first.get();
70 IA = Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].second.get();
86 LLVMContext &Ctx = Scope->getContext();
90 Result.ScopeIdx = Ctx.pImpl->getOrAddScopeRecordIdxEntry(Scope, 0);
92 Result.ScopeIdx = Ctx.pImpl->getOrAddScopeInlinedAtIdxEntry(Scope,
100 MDNode *DebugLoc::getAsMDNode(const LLVMContext &Ctx) const {
104 getScopeAndInlinedAt(Scope, IA, Ctx);
133 void DebugLoc::dump(const LLVMContext &Ctx) const {
139 DebugLoc InlinedAtDL = DebugLoc::getFromDILocation(getInlinedAt(Ctx));
142 InlinedAtDL.dump(Ctx);
225 assert(Ctx->ScopeRecordIdx[Cur] == Idx && "Mapping out of date!");
226 Ctx->ScopeRecordIdx.erase(Cur);
235 assert(unsigned(-Idx-1) < Ctx->ScopeInlinedAtRecords.size());
236 std::pair<DebugRecVH, DebugRecVH> &Entry = Ctx->ScopeInlinedAtRecords[-Idx-1];
246 assert(Ctx->ScopeInlinedAtIdx[std::make_pair(OldScope, OldInlinedAt)] == Idx&&
248 Ctx->ScopeInlinedAtIdx.erase(std::make_pair(OldScope, OldInlinedAt));
274 assert(Ctx->ScopeRecordIdx[OldVal] == Idx && "Mapping out of date!");
275 Ctx->ScopeRecordIdx.erase(OldVal);
278 int NewEntry = Ctx->getOrAddScopeRecordIdxEntry(NewVal, Idx);
289 assert(unsigned(-Idx-1) < Ctx->ScopeInlinedAtRecords.size());
290 std::pair<DebugRecVH, DebugRecVH> &Entry = Ctx->ScopeInlinedAtRecords[-Idx-1];
300 assert(Ctx->ScopeInlinedAtIdx[std::make_pair(OldScope, OldInlinedAt)] == Idx&&
302 Ctx->ScopeInlinedAtIdx.erase(std::make_pair(OldScope, OldInlinedAt));
307 int NewIdx = Ctx->getOrAddScopeInlinedAtIdxEntry(Entry.first.get(),
312 std::pair<DebugRecVH, DebugRecVH> &Entry=Ctx->ScopeInlinedAtRecords[-Idx-1];