[llvm] 77b55c7 - [llvm][docs] Add notes on upstreaming code from downstream projects (#129743)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 12 04:17:22 PDT 2025


Author: Andrzej WarzyƄski
Date: 2025-03-12T11:17:19Z
New Revision: 77b55c76acebf30d3951788d1651607d5276380e

URL: https://github.com/llvm/llvm-project/commit/77b55c76acebf30d3951788d1651607d5276380e
DIFF: https://github.com/llvm/llvm-project/commit/77b55c76acebf30d3951788d1651607d5276380e.diff

LOG: [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

Added: 
    

Modified: 
    llvm/docs/CodeReview.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/CodeReview.rst b/llvm/docs/CodeReview.rst
index 4cfd91435247c..89b7adf13eaec 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 <https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors>`_).
+* 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.


        


More information about the llvm-commits mailing list