[PATCH] D152570: [clang] Apply -fmacro-prefix-map to anonymous tags in template arguments

2023-06-15 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 531931. dankm added a comment. Update release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Expr.cpp clan

[PATCH] D152570: [clang] Apply -fmacro-prefix-map to anonymous tags in template arguments

2023-06-15 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Thanks, I'll update the release notes & description right away. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 ___ cfe-commits mailing l

[PATCH] D152570: [clang] Apply -fmacro-prefix-map to anonymous tags in template arguments

2023-06-13 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. @MaskRay if this meets your approval, are you able to commit it for me? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 ___ cfe-commits m

[PATCH] D152570: [clang] Fix filename remapping in template arguments

2023-06-12 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Maybe for the description something like: Apply -fmacro-prefix-map to anonymous tags in template arguments Do I need to mention TypePrinter? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.o

[PATCH] D152570: [clang] Fix filename remapping in template arguments

2023-06-12 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 530763. dankm added a comment. Renamed & cleaned up unit tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Expr

[PATCH] D152570: [clang] Fix filename remapping in template arguments

2023-06-12 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Avoiding "Fix" in the description is a good suggestion. Whether it's a bugfix or not is a matter of perspective, and what's really happening here is I'm adjusting compliant implementation defined behavior, not really fixing it. Comment at: clang/test/Co

[PATCH] D152570: [clang] Fix filename remapping in template arguments

2023-06-12 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 530638. dankm added a comment. Fix unit tests on windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Expr.cpp

[PATCH] D152570: [clang] Fix filename remapping in template arguments

2023-06-12 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 530563. dankm added a comment. Rebase and hopefully fix builds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Exp

[PATCH] D152570: [clang] Fix file mapping template arguments

2023-06-09 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 530070. dankm added a comment. Fix typo in release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Expr.cpp

[PATCH] D152570: [clang] Fix file mapping template arguments

2023-06-09 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 530069. dankm added a comment. Added unit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152570/new/ https://reviews.llvm.org/D152570 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Expr.cpp clang/tes

[PATCH] D152570: [clang] Fix file mapping template arguments

2023-06-09 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: clang/lib/AST/Expr.cpp:791 +public: + PrettyCallbacks(const LangOptions &L) : LO(L) {} + std::string remapPath(StringRef Path) const override { shafik wrote: > This may not be a well known idiom but is widely

[PATCH] D152570: [clang] Fix file mapping template arguments

2023-06-09 Thread Dan McGregor via Phabricator via cfe-commits
dankm created this revision. Herald added a project: All. dankm added a comment. dankm updated this revision to Diff 530046. dankm published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. I still need to make a unit test for this. Should be more-or

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-28 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D149272#4306103 , @aaron.ballman wrote: > LGTM, but please add a release note when landing. Thanks, I do not have permission to land, are you able to? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-28 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 518050. dankm added a comment. Rebase & add add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149272/new/ https://reviews.llvm.org/D149272 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/Decl.

[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

2023-04-27 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. I certainly like the idea. I'll spend some time later looking at the implementation, but from a quick glance it looks good. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149193/new/ https://reviews.llvm.org/D149193

[PATCH] D148975: -fdebug-prefix-map=: make the last win when multiple prefixes match

2023-04-27 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D148975#4296895 , @MaskRay wrote: > Thank you! I feel that specifying multiple `-fdebug-prefix-map=` is a very > uncommon situation, so a release note entry is likely overkill. > I updated the HelpText, though. The Yocto projec

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-27 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 517595. dankm added a comment. Correct test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149272/new/ https://reviews.llvm.org/D149272 Files: clang/lib/AST/Decl.cpp clang/lib/AST/DeclarationName.cpp c

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-27 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: clang/test/CodeGen/debug-prefix-map.cpp:1 +// RUN: %clang++ -g -fdebug-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL + dankm wrote: > aaron.ballman wrote: > > I'm tak

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-27 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: clang/test/CodeGen/debug-prefix-map.cpp:1 +// RUN: %clang++ -g -fdebug-prefix-map=%p=./UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-REL + aaron.ballman wrote: > I'm taking a guess at co

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D149272#4301103 , @raj.khem wrote: > This would fix https://github.com/llvm/llvm-project/issues/62192 Thanks. I didn't know that was created. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 517427. dankm added a comment. And restore original change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149272/new/ https://reviews.llvm.org/D149272 Files: clang/lib/AST/Decl.cpp clang/lib/AST/DeclarationNa

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 517426. dankm added a comment. Add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149272/new/ https://reviews.llvm.org/D149272 Files: clang/test/CodeGen/debug-prefix-map.cpp Index: clang/test/CodeGe

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Hoorat for me. I just managed to produce a reduced test case. That'll be added to the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149272/new/ https://reviews.llvm.org/D149272 __

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: clang/lib/AST/DeclarationName.cpp:119-125 if (const RecordType *ClassRec = ClassType->getAs()) { -OS << *ClassRec->getDecl(); +ClassRec->getDecl()->printName(OS, Policy); return; } if (Policy.SuppressTemplateArgsInCXX

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. This fixes and issue I wasn't able to reduce. Some lambdas wound up with the real filename in their name, rather than the remapped path from -ffile-prefix-map. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149272/new/ https

[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm created this revision. dankm added a reviewer: MaskRay. Herald added a project: All. dankm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rather than sending a name directly to the stream, use printName to preserve any PrintingPolicy

[PATCH] D136554: Implement CWG2631

2022-12-12 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: clang/include/clang/Sema/Sema.h:9688 +} +return llvm::None; + } llvm::None has been deprecated in favour of std::nullopt. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D135284: [Driver] allow target override containing . in executable name

2022-10-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Thanks! Since I don't have privileges to push, can you do that on my behalf? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135284/new/ https://reviews.llvm.org/D135284 ___ cfe-comm

[PATCH] D135284: [Driver] select alternative target containing . in executable name

2022-10-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D135284#3886471 , @MaskRay wrote: > In D135284#3886469 , @dankm wrote: > >> Thanks for the feedback. I've added a testcase for this, I'll push that >> change and update the summary. > >

[PATCH] D135284: [Driver] select alternative target containing . in executable name

2022-10-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 470918. dankm added a comment. Added a simple testcase, and updated commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135284/new/ https://reviews.llvm.org/D135284 Files: clang/lib/Driver/ToolChain.

[PATCH] D135284: [Driver] select alternative target containing . in executable name

2022-10-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Thanks for the feedback. I've added a testcase for this, I'll push that change and update the summary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135284/new/ https://reviews.llvm.org/D135284 _

[PATCH] D135284: RFC: [Driver] select alternative target containing . in executable name

2022-10-05 Thread Dan McGregor via Phabricator via cfe-commits
dankm created this revision. Herald added subscribers: pengfei, krytarowski, arichardson, emaste. Herald added a project: All. dankm added reviewers: echristo, zarko. dankm added a comment. dankm published this revision for review. Herald added subscribers: cfe-commits, MaskRay. Herald added a proj

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

2019-11-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D49466#1760860 , @MaskRay wrote: > Add back remapDIPath that was unintentionally deleted by D69213 > , caught by a test. > > Small adjustment of the code Right. Can't believe I missed that. Than

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

2019-11-26 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2019-11-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D49466#1681534 , @phosek wrote: > @dankm is it OK if we take over this change to push it forward? At this point sure. Unless it's accepted as-is now, then I don't have a commit bit to finish it off. Repository: rG LLVM Gith

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

2019-11-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 229837. dankm added a comment. - Address feedback from @Lekensteyn Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: clang/include/clang/Basic/DiagnosticDriverKind

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

2019-11-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. Whoops. There are extra changes here I didn't mean to submit :/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 ___ cfe-commits mailing l

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

2019-11-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 229835. dankm added a comment. Herald added subscribers: lldb-commits, mgorny. Herald added a project: LLDB. - Address feedback from @Lekensteyn Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://re

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

2019-11-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked an inline comment as done. dankm added inline comments. Comment at: clang/test/Driver/debug-prefix-map.c:8 +// RUN: %clang -### -ffile-prefix-map=old=new %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-SIMPLE +// RUN: %clang -### -ffile-prefix-map=old=new %s 2>&1 |

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

2019-11-17 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked 2 inline comments as done. dankm added inline comments. Comment at: llvm/include/llvm/Support/Path.h:172 +/// @param style The path separator style +/// @param strict Strict prefix path checking +/// @result true if \a Path begins with OldPrefix Leke

[PATCH] D65556: Phabricator D49466

2019-08-08 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D65556#1610001 , @lebedev.ri wrote: > Please fix patch title and description Sorry, I'm going to delete this. It was supposed to be a new patchset on D49466 . Repository: rG LLVM Github Mono

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

2019-07-31 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 212723. dankm added a comment. Herald added subscribers: llvm-commits, ormris, hiraditya. Herald added a project: LLVM. Latest changes. I've been sitting on these for months, so I don't remember all that changed. The path remapping contract changed somewhat, an

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

2019-07-31 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D49466#1586140 , @manojgupta wrote: > @dankm are you still working on this patch? Yes, I've been afk for a bit due to family circumstances, but I just uploaded more. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D65556: Phabricator D49466

2019-07-31 Thread Dan McGregor via Phabricator via cfe-commits
dankm created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, emaste. Herald added projects: clang, LLVM. path prefix mapping: enforce path matching Force the prefix string to match a complete prefix in the path to remap, and strip any trailing path separators from

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

2019-01-16 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 182121. dankm added a comment. Move trailing path separator stripping back to Clang. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: include/clang/Basic/DiagnosticDriverKinds.t

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

2019-01-16 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked an inline comment as done. dankm added a comment. Sure, I'll (eventually) make a separate review. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 ___ cfe-commits

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

2019-01-16 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 182047. dankm added a comment. Undo accidental change. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Optio

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

2019-01-16 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 182037. dankm added a comment. Update style. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/Options.td in

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

2019-01-16 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked an inline comment as done. dankm added a comment. I'll update the style nit, and spend some non-tired time on the string remapping. Thanks Comment at: lib/CodeGen/CGDebugInfo.cpp:607 llvm::DIFile *CUFile = DBuilder.createFile( - remapDIPath(MainFileName)

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

2019-01-15 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 181964. dankm marked an inline comment as done. dankm added a comment. Enforce path mapping. This requires LLVM review D56769 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://

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

2019-01-14 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked 3 inline comments as done. dankm added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:612 +if (Map.find('=') == StringRef::npos) + D.Diag(diag::err_drv_invalid_argument_to_fdebug_prefix_map) << Map; +else Lekensteyn wrote:

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

2019-01-14 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 181562. dankm added a comment. Restored original test case file names. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: include/clang/Basic/DiagnosticDriverKinds.td include/cl

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

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked 4 inline comments as done. dankm added a comment. In D49466#1354468 , @Lekensteyn wrote: > Could you add more tests to check the error message for bad options (missing > `=`): > > -fdebug-prefix-map=bad > -fmacro-prefix-map=bad > -ffile

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

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 181363. dankm added a comment. renamed err_drv_invalid_argument_to_prefix_map to err_drv_invalid_argument_to_option added more frontend tests for macro-prefix-map and file-prefix-map. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.or

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

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 181293. dankm added a comment. Made diagnostics for file-prefix-map display the actual option name. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49466/new/ https://reviews.llvm.org/D49466 Files: include/clang/Basic/Diagnost

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

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm marked 2 inline comments as done. dankm added a comment. In D49466#1354238 , @Lekensteyn wrote: > It would be nice to have this for Clang 8.0, the branch date is within 5 days > :) Yup, that's why I'm ignoring a new baby for this :) ===

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

2019-01-11 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D49466#1353437 , @alxu wrote: > FYI, according to my comment on D49652 , > assuming I checked it correctly, gcc applies the maps in reverse order of > command line specification, not sorted order

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

2019-01-10 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 181151. dankm added a comment. Added unit tests for the prefix remapping. Switched the sorting on the prefix map, so that /sub gets remapped before if both are specified. I intend to do a more invasive change after this review to unify path prefix remapping

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

2019-01-10 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: lib/Lex/PPMacroExpansion.cpp:1460 + for (const auto &Entry : MacroPrefixMap) +if (Path.startswith(Entry.first)) + return (Twine(Entry.second) + Path.substr(Entry.first.size())).str(); Lekensteyn wrote: > joerg wr

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

2019-01-10 Thread Dan McGregor via Phabricator via cfe-commits
dankm added a comment. In D49466#1296790 , @ChristophBerg wrote: > PostgreSQL 11 is now using LLVM to do JITing of SQL expressions. We'd need > this feature to strip the build directory off the .bc bitcode files so the > .deb packages build reproducibly

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

2018-07-19 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 156295. dankm retitled this revision from "Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map" to "Initial implementation of -fmacro-prefix-map and -ffile-prefix-map". dankm edited the summary of this revision. Repository: rC Clang https://re

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

2018-07-19 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: include/clang/Lex/PreprocessorOptions.h:171 + /// A prefix map for __FILE__ and __BASEFILE__ + std::map MacroPrefixMap; + erichkeane wrote: > erichkeane wrote: > > It seems this can be StringRefs as well. > Did you miss

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

2018-07-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm updated this revision to Diff 156164. dankm retitled this revision from "Initial implementation of -fmacro-prefix-map and -ffile-prefix-map" to "Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map". dankm added a comment. Address some of the comments by erichkeane and joerg.

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

2018-07-18 Thread Dan McGregor via Phabricator via cfe-commits
dankm added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:609 static void addDebugPrefixMapArg(const Driver &D, const ArgList &Args, ArgStringList &CmdArgs) { + for (const Arg *A : Args.filtered(options::OPT_ffile_prefix_map_EQ)) { +StringRef Map = A->getVal

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

2018-07-17 Thread Dan McGregor via Phabricator via cfe-commits
dankm created this revision. Herald added a subscriber: cfe-commits. GCC 8 implements -fmacro-prefix-map. Like -fdebug-prefix-map it replaces a string prefix for the __FILE__ macro. -ffile-prefix-map is the union of -fdebug-prefix-map and -fmacro-prefix-map Repository: rC Clang https://review