Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use accessors for ValueHandleBase::V; NFC #6660

Merged

Conversation

lizhengxing
Copy link
Collaborator

This PR pulls the upstream change, Use accessors for ValueHandleBase::V; NFC (llvm/llvm-project@6f08789), into DXC.

Here's the summary of the change:

This changes code that touches ValueHandleBase::V to go through getValPtr and (newly added) setValPtr. This functionality will be used later, but also seemed like a generally good cleanup.

I also renamed the field to Val, but that's just to make it obvious that I fixed all the uses.

This is part 1 of the fix for #6659.

This PR pulls the upstream change, Use accessors for ValueHandleBase::V; NFC (llvm/llvm-project@6f08789), into DXC.

Here's the summary of the change:
  This changes code that touches ValueHandleBase::V to go through getValPtr and (newly added) setValPtr.  This functionality will be used later, but also seemed like a generally good cleanup.

  I also renamed the field to Val, but that's just to make it obvious that I fixed all the uses.

This is part 1 of the fix for #6659.
@lizhengxing lizhengxing requested a review from a team as a code owner May 30, 2024 21:00
Copy link
Contributor

github-actions bot commented May 30, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 978d36221daecfb745fde05a78bd134a389cb934 2378f9b705bdabc953a707b4abcef16d9c177c4f -- include/llvm/IR/ValueHandle.h lib/IR/Value.cpp
View the diff from clang-format here.
diff --git a/include/llvm/IR/ValueHandle.h b/include/llvm/IR/ValueHandle.h
index 6a9a9cf4..08a59806 100644
--- a/include/llvm/IR/ValueHandle.h
+++ b/include/llvm/IR/ValueHandle.h
@@ -63,9 +63,9 @@ private:
   ValueHandleBase(const ValueHandleBase&) = delete;
 public:
   explicit ValueHandleBase(HandleBaseKind Kind)
-    : PrevPair(nullptr, Kind), Next(nullptr), Val(nullptr) {}
+      : PrevPair(nullptr, Kind), Next(nullptr), Val(nullptr) {}
   ValueHandleBase(HandleBaseKind Kind, Value *V)
-    : PrevPair(nullptr, Kind), Next(nullptr), Val(V) {
+      : PrevPair(nullptr, Kind), Next(nullptr), Val(V) {
     if (isValid(getValPtr()))
       AddToUseList();
   }
  • Check this box to apply formatting changes to this branch.

@lizhengxing lizhengxing merged commit 8408ae8 into main Jun 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants