Lines Matching defs:DebugLoc
1 //===-- DebugLoc.cpp - Implement DebugLoc class ---------------------------===//
10 #include "llvm/IR/DebugLoc.h"
16 // DebugLoc Implementation
18 DebugLoc::DebugLoc(const DILocation *L) : Loc(const_cast<DILocation *>(L)) {}
19 DebugLoc::DebugLoc(const MDNode *L) : Loc(const_cast<MDNode *>(L)) {}
21 DILocation *DebugLoc::get() const {
25 unsigned DebugLoc::getLine() const {
26 assert(get() && "Expected valid DebugLoc");
30 unsigned DebugLoc::getCol() const {
31 assert(get() && "Expected valid DebugLoc");
35 MDNode *DebugLoc::getScope() const {
36 assert(get() && "Expected valid DebugLoc");
40 DILocation *DebugLoc::getInlinedAt() const {
41 assert(get() && "Expected valid DebugLoc");
45 MDNode *DebugLoc::getInlinedAtScope() const {
49 DebugLoc DebugLoc::getFnDebugLoc() const {
53 return DebugLoc::get(SP->getScopeLine(), 0, SP);
55 return DebugLoc();
58 DebugLoc DebugLoc::get(unsigned Line, unsigned Col, const MDNode *Scope,
62 return DebugLoc();
69 LLVM_DUMP_METHOD void DebugLoc::dump() const {
77 if (DebugLoc InlinedAtDL = DebugLoc(getInlinedAt())) {
85 void DebugLoc::print(raw_ostream &OS) const {
96 if (DebugLoc InlinedAtDL = getInlinedAt()) {