Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/include/llvm/IR/DebugLoc.h
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | public: | ||||
/// | /// | ||||
/// Create a new DebugLoc at the specified line/col and scope/inline. This | /// Create a new DebugLoc at the specified line/col and scope/inline. This | ||||
/// forwards to \a DILocation::get(). | /// forwards to \a DILocation::get(). | ||||
/// | /// | ||||
/// If \c !Scope, returns a default-constructed \a DebugLoc. | /// If \c !Scope, returns a default-constructed \a DebugLoc. | ||||
/// | /// | ||||
/// FIXME: Remove this. Users should use DILocation::get(). | /// FIXME: Remove this. Users should use DILocation::get(). | ||||
static DebugLoc get(unsigned Line, unsigned Col, const MDNode *Scope, | static DebugLoc get(unsigned Line, unsigned Col, const MDNode *Scope, | ||||
const MDNode *InlinedAt = nullptr); | const MDNode *InlinedAt = nullptr, | ||||
bool ImplicitCode = false); | |||||
enum { ReplaceLastInlinedAt = true }; | enum { ReplaceLastInlinedAt = true }; | ||||
/// Rebuild the entire inlined-at chain for this instruction so that the top of | /// Rebuild the entire inlined-at chain for this instruction so that the top of | ||||
/// the chain now is inlined-at the new call site. | /// the chain now is inlined-at the new call site. | ||||
/// \param InlinedAt The new outermost inlined-at in the chain. | /// \param InlinedAt The new outermost inlined-at in the chain. | ||||
/// \param ReplaceLast Replace the last location in the inlined-at chain. | /// \param ReplaceLast Replace the last location in the inlined-at chain. | ||||
static DebugLoc appendInlinedAt(DebugLoc DL, DILocation *InlinedAt, | static DebugLoc appendInlinedAt(DebugLoc DL, DILocation *InlinedAt, | ||||
LLVMContext &Ctx, | LLVMContext &Ctx, | ||||
Show All 17 Lines | public: | ||||
/// | /// | ||||
/// FIXME: Remove this. Users should use DILocation/DILocalScope API to | /// FIXME: Remove this. Users should use DILocation/DILocalScope API to | ||||
/// find the subprogram, and then DILocation::get(). | /// find the subprogram, and then DILocation::get(). | ||||
DebugLoc getFnDebugLoc() const; | DebugLoc getFnDebugLoc() const; | ||||
/// Return \c this as a bar \a MDNode. | /// Return \c this as a bar \a MDNode. | ||||
MDNode *getAsMDNode() const { return Loc; } | MDNode *getAsMDNode() const { return Loc; } | ||||
/// Check if the DebugLoc corresponds to an implicit code. | |||||
bool isImplicitCode() const; | |||||
void setImplicitCode(bool ImplicitCode); | |||||
bool operator==(const DebugLoc &DL) const { return Loc == DL.Loc; } | bool operator==(const DebugLoc &DL) const { return Loc == DL.Loc; } | ||||
bool operator!=(const DebugLoc &DL) const { return Loc != DL.Loc; } | bool operator!=(const DebugLoc &DL) const { return Loc != DL.Loc; } | ||||
void dump() const; | void dump() const; | ||||
/// prints source location /path/to/file.exe:line:col @[inlined at] | /// prints source location /path/to/file.exe:line:col @[inlined at] | ||||
void print(raw_ostream &OS) const; | void print(raw_ostream &OS) const; | ||||
}; | }; | ||||
} // end namespace llvm | } // end namespace llvm | ||||
#endif /* LLVM_SUPPORT_DEBUGLOC_H */ | #endif /* LLVM_SUPPORT_DEBUGLOC_H */ |