17 return E->getExprLoc();
19 return S->getBeginLoc();
21 return D->getBeginLoc();
27 return E->getSourceRange();
29 return S->getSourceRange();
31 return D->getSourceRange();
36 if (
auto *S = Source.dyn_cast<
const Stmt *>())
37 return dyn_cast<Expr>(S);
44 llvm::report_fatal_error(
"missing source expression");
Decl - This represents one declaration (or definition), e.g.
This represents one expression.
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
Pointer into the code segment.
const Decl * asDecl() const
const Expr * asExpr() const
const Stmt * asStmt() const
SourceLocation getLoc() const
SourceRange getRange() const
virtual SourceInfo getSource(const Function *F, CodePtr PC) const =0
Returns source information for a given PC in a function.
SourceLocation getLocation(const Function *F, CodePtr PC) const
Returns the location from which an opcode originates.
SourceRange getRange(const Function *F, CodePtr PC) const
const Expr * getExpr(const Function *F, CodePtr PC) const
Returns the expression if an opcode belongs to one, null otherwise.