[sanitizer] Change strip_path_prefix flag behavior.

Previously (in tools other than TSan) the entire prefix of the path had to mach
the argument. With this change, only some suffix of the prefix has to match.
This is the same way this flag works in TSan.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186837 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/sanitizer_common/sanitizer_stacktrace.cc b/lib/sanitizer_common/sanitizer_stacktrace.cc
index 8ac78ae..e279a9f 100644
--- a/lib/sanitizer_common/sanitizer_stacktrace.cc
+++ b/lib/sanitizer_common/sanitizer_stacktrace.cc
@@ -20,8 +20,9 @@
 const char *StripPathPrefix(const char *filepath,
                             const char *strip_file_prefix) {
   if (filepath == 0) return 0;
-  if (filepath == internal_strstr(filepath, strip_file_prefix))
-    return filepath + internal_strlen(strip_file_prefix);
+  const char *prefix_beg = internal_strstr(filepath, strip_file_prefix);
+  if (prefix_beg)
+    return prefix_beg + internal_strlen(strip_file_prefix);
   return filepath;
 }