[llvm] [SandboxIR] Add InsertValueInst (PR #106273)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 12:24:46 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 7f04a8ad131881b5a58b97c8191733ed42d18e20 eb4817c4f5f2d11571f15ab81b1353962afea0b3 --extensions h,cpp -- llvm/include/llvm/SandboxIR/SandboxIR.h llvm/lib/SandboxIR/SandboxIR.cpp llvm/unittests/SandboxIR/SandboxIRTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/SandboxIR/SandboxIR.cpp b/llvm/lib/SandboxIR/SandboxIR.cpp
index 58fe15b624..b1a7bb29df 100644
--- a/llvm/lib/SandboxIR/SandboxIR.cpp
+++ b/llvm/lib/SandboxIR/SandboxIR.cpp
@@ -2286,8 +2286,8 @@ Value *Context::getOrCreateValueInternal(llvm::Value *LLVMV, llvm::User *U) {
}
case llvm::Instruction::InsertValue: {
auto *LLVMIns = cast<llvm::InsertValueInst>(LLVMV);
- It->second = std::unique_ptr<InsertValueInst>(
- new InsertValueInst(LLVMIns, *this));
+ It->second =
+ std::unique_ptr<InsertValueInst>(new InsertValueInst(LLVMIns, *this));
return It->second.get();
}
case llvm::Instruction::Br: {
@@ -2501,8 +2501,7 @@ Context::createShuffleVectorInst(llvm::ShuffleVectorInst *SVI) {
return cast<ShuffleVectorInst>(registerValue(std::move(NewPtr)));
}
-InsertValueInst *
-Context::createInsertValueInst(llvm::InsertValueInst *IVI) {
+InsertValueInst *Context::createInsertValueInst(llvm::InsertValueInst *IVI) {
auto NewPtr =
std::unique_ptr<InsertValueInst>(new InsertValueInst(IVI, *this));
return cast<InsertValueInst>(registerValue(std::move(NewPtr)));
diff --git a/llvm/unittests/SandboxIR/SandboxIRTest.cpp b/llvm/unittests/SandboxIR/SandboxIRTest.cpp
index 039285ff2b..4e44dbc9da 100644
--- a/llvm/unittests/SandboxIR/SandboxIRTest.cpp
+++ b/llvm/unittests/SandboxIR/SandboxIRTest.cpp
@@ -1294,7 +1294,7 @@ define void @foo({i32, float} %agg, i32 %i) {
// getAggregateOperand
EXPECT_EQ(Ins0->getAggregateOperand(), ArgAgg);
- const auto* ConstIns0 = Ins0;
+ const auto *ConstIns0 = Ins0;
EXPECT_EQ(ConstIns0->getAggregateOperand(), ArgAgg);
// getAggregateOperandIndex
``````````
</details>
https://github.com/llvm/llvm-project/pull/106273
More information about the llvm-commits
mailing list