================
@@ -4068,6 +4068,15 @@ llvm::Constant 
*CodeGenFunction::EmitCheckSourceLocation(SourceLocation Loc) {
   if (PLoc.isValid()) {
     StringRef FilenameString = PLoc.getFilename();
 
+    // Apply sanitize prefix map.
+    SmallString<256> RemappedName(FilenameString);
+    for (const auto &[Old, New] : CGM.getCodeGenOpts().SanitizePrefixMap) {
----------------
vitalybuka wrote:

```suggestion
    for (const auto &[Old, New] :
         llvm::reverse(CGM.getCodeGenOpts().SanitizePrefixMap)) {
```
Iterate in reverse so the last matching prefix wins, consistent with 
-fdebug-prefix-map, -fcoverage-prefix-map, and -ffile-prefix-map.

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

Reply via email to