summaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_diag.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ubsan/ubsan_diag.h')
-rw-r--r--lib/ubsan/ubsan_diag.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ubsan/ubsan_diag.h b/lib/ubsan/ubsan_diag.h
index 16afffdb..54d15a0c 100644
--- a/lib/ubsan/ubsan_diag.h
+++ b/lib/ubsan/ubsan_diag.h
@@ -80,6 +80,12 @@ public:
/// an invalid location or a module location for the caller.
Location getCallerLocation(uptr CallerLoc = GET_CALLER_PC());
+/// Try to obtain a location for the given function pointer. This might fail,
+/// and produce either an invalid location or a module location for the caller.
+/// If FName is non-null and the name of the function is known, set *FName to
+/// the function name, otherwise *FName is unchanged.
+Location getFunctionLocation(uptr Loc, const char **FName);
+
/// A diagnostic severity level.
enum DiagLevel {
DL_Error, ///< An error.