21 if (ScopeIdx == 0)
return 0;
40 if (ScopeIdx >= 0)
return 0;
79 if (Scope == 0)
return Result;
82 if (Col > 255) Col = 0;
83 if (Line >= (1 << 24)) Line = 0;
84 Result.LineCol = Line | (Col << 24);
105 assert(Scope &&
"If scope is null, this should be isUnknown()");
142 InlinedAtDL.
dump(Ctx);
154 return static_cast<unsigned>(
hash_combine(Key.LineCol, Key.ScopeIdx));
169 return Idx = ExistingIdx;
192 return Idx = ExistingIdx;
225 assert(Ctx->
ScopeRecordIdx[Cur] == Idx &&
"Mapping out of date!");
237 assert((
this == &Entry.first ||
this == &Entry.second) &&
238 "Mapping out of date!");
241 MDNode *OldInlinedAt = Entry.second.
get();
242 assert(OldScope != 0 && OldInlinedAt != 0 &&
243 "Entry should be non-canonical if either val dropped to null");
247 "Mapping out of date");
253 Entry.first.Idx = Entry.second.Idx = 0;
260 if (NewVal == 0)
return deleted();
270 assert(OldVal != NewVa &&
"Node replaced with self?");
274 assert(Ctx->
ScopeRecordIdx[OldVal] == Idx &&
"Mapping out of date!");
291 assert((
this == &Entry.first ||
this == &Entry.second) &&
292 "Mapping out of date!");
295 MDNode *OldInlinedAt = Entry.second.
get();
296 assert(OldScope != 0 && OldInlinedAt != 0 &&
297 "Entry should be non-canonical if either val dropped to null");
301 "Mapping out of date");
308 Entry.second.get(), Idx);
313 Entry.first.Idx = Entry.second.Idx = 0;
DILocation getOrigLocation() const
std::vector< std::pair< DebugRecVH, DebugRecVH > > ScopeInlinedAtRecords
unsigned getLineNumber() const
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
DIScope getContext() const
MDNode * getAsMDNode(const LLVMContext &Ctx) const
void getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA, const LLVMContext &Ctx) const
getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.
DenseMap< MDNode *, int > ScopeRecordIdx
MDNode - a tuple of other values.
std::vector< DebugRecVH > ScopeRecords
DenseMap< std::pair< MDNode *, MDNode * >, int > ScopeInlinedAtIdx
static MDNode * get(LLVMContext &Context, ArrayRef< Value * > Vals)
bool isUnknown() const
isUnknown - Return true if this is an unknown location.
unsigned getColumnNumber() const
DILexicalBlock - This is a wrapper for a lexical block.
static DebugLoc getFromDILexicalBlock(MDNode *N)
getFromDILexicalBlock - Translate the DILexicalBlock into a DebugLoc.
unsigned getLineNumber() const
int getOrAddScopeRecordIdxEntry(MDNode *N, int ExistingIdx)
hash_code hash_combine(const T1 &arg1, const T2 &arg2, const T3 &arg3, const T4 &arg4, const T5 &arg5, const T6 &arg6)
void dump(const LLVMContext &Ctx) const
MDNode * getInlinedAt(const LLVMContext &Ctx) const
LLVMContext & getContext() const
All values hold a context through their type.
LLVMContextImpl *const pImpl
MDNode * getScope(const LLVMContext &Ctx) const
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
virtual void allUsesReplacedWith(Value *VNew)
unsigned getColumnNumber() const
static DebugLoc get(unsigned Line, unsigned Col, MDNode *Scope, MDNode *InlinedAt=0)
static IntegerType * getInt32Ty(LLVMContext &C)
static DebugLoc getFromDILocation(MDNode *N)
getFromDILocation - Translate the DILocation quad into a DebugLoc.
LLVM Value Representation.
int getOrAddScopeInlinedAtIdxEntry(MDNode *Scope, MDNode *IA, int ExistingIdx)