From 77b55c76acebf30d3951788d1651607d5276380e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Warzy=C5=84ski?= Date: Wed, 12 Mar 2025 11:17:19 +0000 Subject: [PATCH] [llvm][docs] Add notes on upstreaming code from downstream projects (#129743) For context, see: * https://discourse.llvm.org/t/code-review-process-when-upstreaming-patches --- llvm/docs/CodeReview.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/llvm/docs/CodeReview.rst b/llvm/docs/CodeReview.rst index 4cfd91435247..89b7adf13eae 100644 --- a/llvm/docs/CodeReview.rst +++ b/llvm/docs/CodeReview.rst @@ -272,3 +272,21 @@ Developers should participate in code reviews as both reviewers and authors. If someone is kind enough to review your code, you should return the favor for someone else. Note that anyone is welcome to review and give feedback on a patch, but approval of patches should be consistent with the policy above. + +Upstreaming Changes to LLVM +=========================== + +When upstreaming your own changes from a downstream project to LLVM, simply +follow the process outlined above. + +When upstreaming changes originally written by someone else: + +* Ensure that there are no obstacles to upstreaming the code. In some cases, + this simply means checking with the original author(s) to ensure they are + aware of and approve the upstreaming. In other cases, licensing + considerations may be more complex. +* Properly attribute the original changes, e.g., by creating a commit with + multiple authors (`GitHub guide `_). +* Invite the original author(s) to review the changes, and also include + additional reviewers. Specifically, an LGTM from a (co-)author should not be + taken as approval to land a change.