[llvm] [SandboxIR] Add remaining SelectInst methods and track swapValues() (PR #108114)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 16:57:02 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff d2f25e5405cce348913994db71a5efb0c1cf7f28 7a12904650cd0b80945b6e7a2d529698a4041cd1 --extensions cpp,h -- llvm/include/llvm/SandboxIR/SandboxIR.h llvm/lib/SandboxIR/SandboxIR.cpp llvm/unittests/SandboxIR/SandboxIRTest.cpp llvm/unittests/SandboxIR/TrackerTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/SandboxIR/SandboxIR.h b/llvm/include/llvm/SandboxIR/SandboxIR.h
index 1e3de9e2d1..88884683f5 100644
--- a/llvm/include/llvm/SandboxIR/SandboxIR.h
+++ b/llvm/include/llvm/SandboxIR/SandboxIR.h
@@ -1507,9 +1507,9 @@ public:
BasicBlock *InsertAtEnd, Context &Ctx,
const Twine &Name = "");
- const Value* getCondition() const { return getOperand(0); }
- const Value* getTrueValue() const { return getOperand(1); }
- const Value* getFalseValue() const { return getOperand(2); }
+ const Value *getCondition() const { return getOperand(0); }
+ const Value *getTrueValue() const { return getOperand(1); }
+ const Value *getFalseValue() const { return getOperand(2); }
Value *getCondition() { return getOperand(0); }
Value *getTrueValue() { return getOperand(1); }
Value *getFalseValue() { return getOperand(2); }
diff --git a/llvm/unittests/SandboxIR/SandboxIRTest.cpp b/llvm/unittests/SandboxIR/SandboxIRTest.cpp
index dbec60496b..b514680762 100644
--- a/llvm/unittests/SandboxIR/SandboxIRTest.cpp
+++ b/llvm/unittests/SandboxIR/SandboxIRTest.cpp
@@ -1354,7 +1354,7 @@ define void @foo(i1 %c0, i8 %v0, i8 %v1, i1 %c1) {
auto *BB = &*F->begin();
auto It = BB->begin();
auto *Select = cast<sandboxir::SelectInst>(&*It++);
- const auto *ConstSelect = Select; // To test the const getters.
+ const auto *ConstSelect = Select; // To test the const getters.
auto *Ret = &*It++;
// Check getCondition().
``````````
</details>
https://github.com/llvm/llvm-project/pull/108114
More information about the llvm-commits
mailing list