================
@@ -2601,8 +2605,23 @@ GlobalVariable 
*ModuleAddressSanitizer::getOrCreateModuleName() {
   if (!ModuleName) {
     // We shouldn't merge same module names, as this string serves as unique
     // module ID in runtime.
+    std::string ModuleNameStr = M.getModuleIdentifier();
+
+    // If a compilation dir is set, make absolute paths relative to it.
+    if (!CompilationDir.empty()) {
+      SmallString<256> Path(ModuleNameStr);
+      if (sys::path::is_absolute(Path)) {
----------------
vitalybuka wrote:

Normalize dot components here as well before matching CompilationDir.
```suggestion
      if (sys::path::is_absolute(Path)) {
        sys::path::remove_dots(Path, /*remove_dot_dot=*/true);
```

https://github.com/llvm/llvm-project/pull/201803
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to