[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

Khem Raj via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 15 11:36:55 PST 2019


raj.khem added inline comments.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:476
   for (const auto &Entry : DebugPrefixMap)
-    if (Path.startswith(Entry.first))
-      return (Twine(Entry.second) + Path.substr(Entry.first.size())).str();
-  return Path.str();
+    if (llvm::sys::path::replace_path_prefix(p, Entry.first, Entry.second))
+      break;
----------------
raj.khem wrote:
> looking at llvm/lib/Support/Path.cpp replace_path_prefix() returns void but here inside if() it will expect a bool return value 
nm I guess I needed to look into https://reviews.llvm.org/D56769 as well.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D49466/new/

https://reviews.llvm.org/D49466





More information about the cfe-commits mailing list