diff options
author | Xinliang David Li <davidxl@google.com> | 2016-07-18 16:16:12 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-07-18 16:16:12 +0000 |
commit | 53e2f16931e10e7d32edd927739836169f80f2a5 (patch) | |
tree | 5c473b3fe651ded937d9b78a521e52c166a9112a /lib/profile/InstrProfilingInternal.h | |
parent | 3e87a261cdc57c4d8f686161f9ecfff4bdacb6a3 (diff) |
Code refactoring: extract path prefix handling code
.. into reusable interfaces. No functional change is expected.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@275807 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingInternal.h')
-rw-r--r-- | lib/profile/InstrProfilingInternal.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/profile/InstrProfilingInternal.h b/lib/profile/InstrProfilingInternal.h index bcbe29a03..44f308206 100644 --- a/lib/profile/InstrProfilingInternal.h +++ b/lib/profile/InstrProfilingInternal.h @@ -163,6 +163,20 @@ void lprofSetupValueProfiler(); * to dump merged profile data into its own profile file. */ uint64_t lprofGetLoadModuleSignature(); +/* GCOV_PREFIX and GCOV_PREFIX_STRIP support */ +/* Return the path prefix specified by GCOV_PREFIX environment variable. + * If GCOV_PREFIX_STRIP is also specified, the strip level (integer value) + * is returned via \c *PrefixStrip. The prefix length is stored in *PrefixLen. + */ +const char *lprofGetPathPrefix(int *PrefixStrip, size_t *PrefixLen); +/* Apply the path prefix specified in \c Prefix to path string in \c PathStr, + * and store the result to buffer pointed to by \c Buffer. If \c PrefixStrip + * is not zero, path prefixes are stripped from \c PathStr (the level of + * stripping is specified by \c PrefixStrip) before \c Prefix is added. + */ +void lprofApplyPathPrefix(char *Dest, const char *PathStr, const char *Prefix, + size_t PrefixLen, int PrefixStrip); + COMPILER_RT_VISIBILITY extern char *(*GetEnvHook)(const char *); COMPILER_RT_VISIBILITY extern void (*FreeHook)(void *); COMPILER_RT_VISIBILITY extern uint8_t *DynamicBufferIOBuffer; |