[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-24 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added a comment. In D148757#4289152 , @MaskRay wrote: > In D148757#4289076 , @MaskRay wrote: > >> I'm creating a patch to change DebugPrefixMap to respect the command line >> option order... > > Created D1

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-24 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 516616. gulfem added a comment. Remove the changes from debuginfo, which is handled in D14897 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.or

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148757#4289076 , @MaskRay wrote: > I'm creating a patch to change DebugPrefixMap to respect the command line > option order... Created D148975 to follow GCC's behavior (the last applicable

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'm creating a patch to change DebugPrefixMap to respect the command line option order... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I wasn't aware that `debug-prefix-map` prefers longest prefix. I agree that ideally `coverage-prefix-map`, `debug-prefix-map` and `macro-prefix-map` should be consistent across all LLVM tools and ideally also across compilers. Repository: rG LLVM Github Monorepo CHAN

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109591 to discuss GCC's behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757 ___

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148757#4285735 , @gulfem wrote: > 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 t

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757 ___

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-20 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
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-ma

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-20 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem updated this revision to Diff 515560. gulfem added a comment. Modified the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148757/new/ https://reviews.llvm.org/D148757 Files: clang/include/clang/Basic/CodeGenOptions.h clang/lib/

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-19 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added a comment. In D148757#4282002 , @MaskRay wrote: > Can you add example options in the description and say how this patch is > going to change it? > > I think `std::map` is intended so that for `-f*-prefix-map` values, if both > `a/b=...` and

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Can you add example options in the description and say how this patch is going to change it? I think `std::map` is intended so that for `-f*-prefix-map` values, if both `a/b=...` and `a/b/c=...` match an input path, the longest wins, not the latest wins. Repository:

[PATCH] D148757: [clang] Follow user-provided order for prefix map

2023-04-19 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem created this revision. Herald added a project: All. gulfem requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch uses llvm::MapVector instead of std::map to ensure that iteration order is the insertion order for file prefix rema