Lines Matching defs:Ctx

19 MDNode *DebugLoc::getScope(const LLVMContext &Ctx) const {
25 assert(unsigned(ScopeIdx) <= Ctx.pImpl->ScopeRecords.size() &&
27 return Ctx.pImpl->ScopeRecords[ScopeIdx-1].get();
31 assert(unsigned(-ScopeIdx) <= Ctx.pImpl->ScopeInlinedAtRecords.size() &&
33 return Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].first.get();
36 MDNode *DebugLoc::getInlinedAt(const LLVMContext &Ctx) const {
42 assert(unsigned(-ScopeIdx) <= Ctx.pImpl->ScopeInlinedAtRecords.size() &&
44 return Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].second.get();
49 const LLVMContext &Ctx) const {
58 assert(unsigned(ScopeIdx) <= Ctx.pImpl->ScopeRecords.size() &&
60 Scope = Ctx.pImpl->ScopeRecords[ScopeIdx-1].get();
66 assert(unsigned(-ScopeIdx) <= Ctx.pImpl->ScopeInlinedAtRecords.size() &&
68 Scope = Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].first.get();
69 IA = Ctx.pImpl->ScopeInlinedAtRecords[-ScopeIdx-1].second.get();
85 LLVMContext &Ctx = Scope->getContext();
89 Result.ScopeIdx = Ctx.pImpl->getOrAddScopeRecordIdxEntry(Scope, 0);
91 Result.ScopeIdx = Ctx.pImpl->getOrAddScopeInlinedAtIdxEntry(Scope,
99 MDNode *DebugLoc::getAsMDNode(const LLVMContext &Ctx) const {
103 getScopeAndInlinedAt(Scope, IA, Ctx);
147 void DebugLoc::dump(const LLVMContext &Ctx) const {
153 DebugLoc InlinedAtDL = DebugLoc::getFromDILocation(getInlinedAt(Ctx));
156 InlinedAtDL.dump(Ctx);
254 assert(Ctx->ScopeRecordIdx[Cur] == Idx && "Mapping out of date!");
255 Ctx->ScopeRecordIdx.erase(Cur);
264 assert(unsigned(-Idx-1) < Ctx->ScopeInlinedAtRecords.size());
265 std::pair<DebugRecVH, DebugRecVH> &Entry = Ctx->ScopeInlinedAtRecords[-Idx-1];
275 assert(Ctx->ScopeInlinedAtIdx[std::make_pair(OldScope, OldInlinedAt)] == Idx&&
277 Ctx->ScopeInlinedAtIdx.erase(std::make_pair(OldScope, OldInlinedAt));
303 assert(Ctx->ScopeRecordIdx[OldVal] == Idx && "Mapping out of date!");
304 Ctx->ScopeRecordIdx.erase(OldVal);
307 int NewEntry = Ctx->getOrAddScopeRecordIdxEntry(NewVal, Idx);
318 assert(unsigned(-Idx-1) < Ctx->ScopeInlinedAtRecords.size());
319 std::pair<DebugRecVH, DebugRecVH> &Entry = Ctx->ScopeInlinedAtRecords[-Idx-1];
329 assert(Ctx->ScopeInlinedAtIdx[std::make_pair(OldScope, OldInlinedAt)] == Idx&&
331 Ctx->ScopeInlinedAtIdx.erase(std::make_pair(OldScope, OldInlinedAt));
336 int NewIdx = Ctx->getOrAddScopeInlinedAtIdxEntry(Entry.first.get(),
341 std::pair<DebugRecVH, DebugRecVH> &Entry=Ctx->ScopeInlinedAtRecords[-Idx-1];