[PATCH] D109128: [VFS] Use original path when falling back to external FS

2021-09-02 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. cc @JDevlieghere Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109128/new/ https://reviews.llvm.org/D109128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-07-09 Thread Varun Gandhi via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG92dcb1d2db8c: [Clang] Introduce Swift async calling convention. (authored by varungandhi-apple). Changed prior to commit: https://reviews.llvm.org

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-06-23 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple abandoned this revision. varungandhi-apple added a comment. Herald added a subscriber: ormris. Combined changes into D95561 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://review

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-06-23 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 354073. varungandhi-apple added a comment. Herald added a subscriber: ormris. Combined D95984 into this patch since all necessary LLVM patches have landed, so having the patches separated out is not helpful. Repo

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-04-05 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 335293. varungandhi-apple added a comment. Herald added subscribers: llvm-commits, dexonsmith, hiraditya. Herald added a project: LLVM. 1. Remove '::' when calling static function. 2. Fix bug in function merging around missing musttail. 3. Add off-by

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-25 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 333421. varungandhi-apple added a comment. Fix codegen + add tests for methods and function pointers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files:

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-11 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 329889. varungandhi-apple added a comment. Use musttail call instead of tail call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files: clang/lib/CodeGen/

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-03-11 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 329883. varungandhi-apple added a comment. Permit swift_context and swift_indirect_result parameters for swiftasynccall functions. (Earlier, these were restricted to swiftcall-only.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-03-02 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 327510. varungandhi-apple added a comment. Add null check for callee; instead of using getFunctionType() directly. Otherwise, it leads to a crash when compiling gtest-all.cc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-26 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 326762. varungandhi-apple added a comment. Added checks for C++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files: clang/lib/CodeGen/CGCall.cpp clang

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-24 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 326203. varungandhi-apple added a comment. Generate tail call when doing codegen for return statement. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 Files:

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-24 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 326194. varungandhi-apple added a comment. Address review feedback; remove centralized target check for CC_SwiftAsync. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95561/new/ https://reviews.llvm.org

[PATCH] D96802: [Clang] Add proper target checks for SwiftAsync convention.

2021-02-17 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple abandoned this revision. varungandhi-apple added a comment. I've updated the earlier patch https://reviews.llvm.org/D95561 to include this change, so that we don't have an in-between state where we erroneously claim that we support a bunch of targets which we don't actually sup

[PATCH] D96802: [Clang] Add proper target checks for SwiftAsync convention.

2021-02-17 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. > The TargetInfo classes are already target-architecture-specific, so it's > somewhat strange for them all to funnel to a single function that then > immediately switches on the target architecture. IMO ideally, the whole thing would be stored as a table of Ta

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-17 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 324389. varungandhi-apple added a comment. - Remove semantic restriction of swift_async_context being only applicable to swiftasynccall. - Update target checks to make sure we only allow supported targets. - Update doc comment. Repository: rG LL

[PATCH] D96802: [Clang] Add proper target checks for SwiftAsync convention.

2021-02-16 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: rjmccall. Herald added subscribers: dexonsmith, pengfei, kbarton, kristof.beyls, jgravelle-google, sbc100, nemanjai, dschuff. varungandhi-apple requested review of this revision. Herald added subscribers: cfe-commits, ahe

[PATCH] D95704: [CodeGen] Introduce DWARF tag for SwiftTail and emit it in CodeGen.

2021-02-12 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 323364. varungandhi-apple added a comment. Tweak test case diff to adjust for change in previous commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95704/new/ https://reviews.llvm.org/D95704 Files

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-12 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 323363. varungandhi-apple added a comment. Fix test case for debuginfo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95561/new/ https://reviews.llvm.org/D95561 Files: clang/include/clang-c/Index.h

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-12 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added inline comments. Comment at: clang/test/CodeGen/debug-info-cc.c:60-66 +// [FIXME: swiftasynccc] Update debuginfo tag to SwiftAsync once LLVM support lands. +// LINUX: !DISubprogram({{.*}}"add_swiftasynccall", {{.*}}type: ![[FTY:[0-9]+]] +// LINUX: ![[FTY]

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-05 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 321801. varungandhi-apple added a comment. Correct documentation on tail call behavior as pointed out by John. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95561/new/ https://reviews.llvm.org/D95561

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-04 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 321501. varungandhi-apple added a comment. 1. Update whitespace and add documentation for swiftasynccall. 2. Update commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95561/new/ https://rev

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-03 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. I am planning to add more tests, figured it is better to put up the patch sooner rather than later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95984/new/ https://reviews.llvm.org/D95984 __

[PATCH] D95984: [CodeGen] Fix codegen for __attribute__((swiftasynccall)).

2021-02-03 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: rjmccall. varungandhi-apple requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. 1. It should be mapped to LLVM's swifttailcc, which is now available. 2. We should make

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-02 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2711 + Out << 'T'; + break; case CC_PreserveMost: Out << 'U'; break; rjmccall wrote: > Please use consistent formatting with the other cases, here and elsewhere.

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-02-02 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:8106-8115 + case ParsedAttr::AT_SwiftAsyncCall: case ParsedAttr::AT_VectorCall: case ParsedAttr::AT_MSABI: case ParsedAttr::AT_SysVABI: case ParsedAttr::AT_Pcs: case ParsedAttr::A

[PATCH] D95814: [NFC] Simplify test to use multiple FileCheck prefixes.

2021-02-01 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: aschwaighofer. varungandhi-apple requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Minor cleanup where we can avoid calling the compiler twice with the same argument

[PATCH] D95704: [CodeGen] Introduce DWARF tag for SwiftTail and emit it in CodeGen.

2021-01-29 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: aprantl. varungandhi-apple requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. swifttailcc is a new calling convention in LLVM introduced in https://

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-01-27 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2688-2689 // ::= S # __attribute__((__swiftcall__)) // Clang-only + // ::= T # __attribute__((__swiftasynccall__)) // + // Cl

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-01-27 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. I don't get how you stack your change on top of someone else's change (the diff seems to have been created with only one commit), but this depends on https://reviews.llvm.org/D95228, which depends on https://reviews.llvm.org/D95044. Repository: rG LLVM Git

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-01-27 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4398 + let Content = [{ +TODO + }]; I have left this as a TODO for now, so that it can be filled in later when the exact details of the convention are implemented in

[PATCH] D95561: [Clang] Introduce Swift async calling convention.

2021-01-27 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added reviewers: rjmccall, ahatanak. Herald added subscribers: dexonsmith, arphaman, kbarton, hiraditya, jgravelle-google, sbc100, nemanjai, dschuff. Herald added a reviewer: aaron.ballman. varungandhi-apple published this revision for rev

[PATCH] D95053: [Demangle] Support demangling Swift calling convention in MS demangler.

2021-01-27 Thread Varun Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG44f792966e0f: [Demangle] Support demangling Swift calling convention in MS demangler. (authored by varungandhi-apple). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D95053: [Demangle] Support demangling Swift calling convention in MS demangler.

2021-01-20 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple marked an inline comment as done. varungandhi-apple added a comment. I've fixed this by including an additional space in the string instead of using a method like `outputSpaceIfNecessary`; (1) that method doesn't work as it is and I think changing it for this purpose is not app

[PATCH] D95053: [Demangle] Support demangling Swift calling convention in MS demangler.

2021-01-20 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 318050. varungandhi-apple added a comment. Add extra space for better readability, as suggested by @compnerd. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95053/new/ https://reviews.llvm.org/D95053

[PATCH] D95053: [Demangle] Support demangling Swift calling convention in MS demangler.

2021-01-20 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: compnerd. Herald added a subscriber: hiraditya. varungandhi-apple requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Previously, Clang was able to m

[PATCH] D94854: [Clang] Fix SwiftCallingConv's aggregate lowering for _Atomic(_Bool).

2021-01-19 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple abandoned this revision. varungandhi-apple added a comment. Closing this in favor of a Swift-side fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94854/new/ https://reviews.llvm.org/D94854 _

[PATCH] D94854: [Clang] Fix SwiftCallingConv's aggregate lowering for _Atomic(_Bool).

2021-01-16 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. > The way you'd test it on the Clang side would be to just write a test case > that passes such an aggregate and tests that it's passed as an `i8`. Ah, I just noticed an attribute `__attribute__((swiftcall))` that is used in some test cases, I can add a test f

[PATCH] D94854: [Clang] Fix SwiftCallingConv's aggregate lowering for _Atomic(_Bool).

2021-01-15 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. I don't know how to test this on the LLVM-side (is there a way to do it?). Here's the Swift side test which trips over right now (but is fixed with this patch) by attempting a zext from an i8 to an i1 in Swift's `NativeConventionSchema::mapIntoNative`. +++

[PATCH] D94854: [Clang] Fix SwiftCallingConv's aggregate lowering for _Atomic(_Bool).

2021-01-15 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added reviewers: aschwaighofer, rjmccall. Herald added a subscriber: jfb. varungandhi-apple requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes rdar://72999296. Repository: rG

[PATCH] D94196: [NFC] Move readAPValue/writeAPValue up the inheritance hierarchy

2021-01-06 Thread Varun Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG37e83bc6db3a: [NFC] Move readAPValue/writeAPValue up the inheritance hierarchy (authored by varungandhi-apple). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D94196: [NFC] Move readAPValue/writeAPValue up the inheritance hierarchy

2021-01-06 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 315005. varungandhi-apple added a comment. Appease clang-tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94196/new/ https://reviews.llvm.org/D94196 Files: clang/include/clang/AST/APValue.h cl

[PATCH] D94196: [NFC] Move readAPValue/writeAPValue up the inheritance hierarchy

2021-01-06 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. varungandhi-apple added a reviewer: rjmccall. varungandhi-apple requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The implementation for (de)serialization of APValues can be shared between Clang and Sw

[PATCH] D82791: [lit] Improve lit's output with default settings and --verbose.

2020-07-26 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. Some of the changes probably don't make perfect sense in this revision because I initially started out with the whole change being one revision and then split things into commits, while trying to minimize the churn between revisions. Please also take a look at

[PATCH] D82791: [lit] Improve lit's output with default settings and --verbose.

2020-07-26 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 280786. varungandhi-apple marked 11 inline comments as done. varungandhi-apple added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82791/new/ https://reviews.llvm.o

[PATCH] D84087: [NFC] Clean up doc comment and implementation for Module::isSubModuleOf.

2020-07-21 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84087/new/ https://reviews.llvm.org/D84087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D84087: [NFC] Clean up doc comment and implementation for Module::isSubModuleOf.

2020-07-21 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple added a comment. (Could you land the patch if it looks good? I don't have commit access.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84087/new/ https://reviews.llvm.org/D84087 ___

[PATCH] D84087: [NFC] Clean up doc comment and implementation for Module::isSubModuleOf.

2020-07-21 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple marked an inline comment as done. varungandhi-apple added inline comments. Comment at: clang/lib/Basic/Module.cpp:176 bool Module::isSubModuleOf(const Module *Other) const { - const Module *This = this; - do { + for (const Module *This = this; This != nullpt

[PATCH] D84087: [NFC] Clean up doc comment and implementation for Module::isSubModuleOf.

2020-07-17 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 278972. varungandhi-apple added a comment. Updated commit message with reviewer information and revision link. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84087/new/ https://reviews.llvm.org/D84087

[PATCH] D84087: [NFC] Clean up doc comment and implementation for Module::isSubModuleOf.

2020-07-17 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D84087 Files: clang/include/clang/Basic/Module.h clang/lib/Basic/Module.cpp Index: clang/lib/Basic/Module.cpp =

[PATCH] D82791: [lit] Improve lit's output with default settings and --verbose.

2020-07-06 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple marked 2 inline comments as done. varungandhi-apple added a comment. Thanks for the review, it's a big patch. 😅 I'm a bit busy at the moment, I will respond to the other comments later this week or sometime next week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D82791: [lit] Improve lit's output with default settings and --verbose.

2020-07-01 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 274865. varungandhi-apple added a comment. Rebase after changes in D82808 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82791/new/ https://reviews.llvm.org/D82791 F

[PATCH] D82791: [lit] Improve lit's output with default settings and --verbose.

2020-06-29 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 274240. varungandhi-apple added a comment. Herald added subscribers: cfe-commits, martong. Herald added a project: clang. Include missing commit separating verbose and showOutput. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D82791: [lit] Improve lit's output with default settings and --verbose.

2020-06-29 Thread Varun Gandhi via Phabricator via cfe-commits
varungandhi-apple updated this revision to Diff 274242. varungandhi-apple added a comment. - [docs] [lit] Add a more helpful description for lit.py's -s flag. - [NFC] [lit] Separate verbose and showOutput. - [lit] Improve lit's output with default settings and --verbose. Repository: rG LLVM Gi