gulfem added a comment. I compared Clang and GCC behavior. **1) Following user-specified prefix mapping order** GCC uses a linked list to store the prefix mappings, so it applies the prefix mappings based on the user-provided order. https://github.com/gcc-mirror/gcc/blob/master/gcc/file-prefix-map.cc#L27 Whereas, Clang currently uses an `std::map`, which does **NOT** follow user-provided order. So, Clang and GCC behavior do not match on that.
**2) Applying multiple prefix mappings** Both Clang and GCC apply the first matching prefix mapping, and does not apply the following prefix mappings. So, they are consistent in that. https://github.com/gcc-mirror/gcc/blob/master/gcc/file-prefix-map.cc#L88 https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CoverageMappingGen.cpp#L1653 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits