[llvm] Clean up after transition into opaque pointers. NFC (PR #102631)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 08:38:50 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 93fc4590d9e584d8a8552d00f45bca982021fb1d a62e0d74c6b88a087895dee072daa51f1e9c396c --extensions cpp,h -- llvm/examples/BrainF/BrainFDriver.cpp llvm/examples/ExceptionDemo/ExceptionDemo.cpp llvm/include/llvm/IR/GlobalIFunc.h llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/IR/LLVMContextImpl.h llvm/lib/IR/TypedPointerType.cpp llvm/lib/IR/Verifier.cpp llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp llvm/lib/Transforms/Scalar/NaryReassociate.cpp llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/examples/BrainF/BrainFDriver.cpp b/llvm/examples/BrainF/BrainFDriver.cpp
index a42e675905..df1cc2e8dd 100644
--- a/llvm/examples/BrainF/BrainFDriver.cpp
+++ b/llvm/examples/BrainF/BrainFDriver.cpp
@@ -69,11 +69,11 @@ JIT("jit", cl::desc("Run program Just-In-Time"));
//Add main function so can be fully compiled
void addMainFunction(Module *mod) {
//define i32 @main(i32 %argc, i8 **%argv)
- FunctionType *main_func_fty = FunctionType::get(
- Type::getInt32Ty(mod->getContext()),
- {Type::getInt32Ty(mod->getContext()),
- PointerType::getUnqual(mod->getContext())},
- false);
+ FunctionType *main_func_fty =
+ FunctionType::get(Type::getInt32Ty(mod->getContext()),
+ {Type::getInt32Ty(mod->getContext()),
+ PointerType::getUnqual(mod->getContext())},
+ false);
Function *main_func =
Function::Create(main_func_fty, Function::ExternalLinkage, "main", mod);
diff --git a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
index 34c4330957..2532b617da 100644
--- a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -1244,8 +1244,7 @@ static llvm::Function *createCatchWrappedInvokeFunction(
llvm::Value *unwindExceptionClass =
builder.CreateLoad(builder.CreateStructGEP(
ourUnwindExceptionType,
- builder.CreatePointerCast(unwindException, builder.getPtrTy()),
- 0));
+ builder.CreatePointerCast(unwindException, builder.getPtrTy()), 0));
// Branch to the externalExceptionBlock if the exception is foreign or
// to a catch router if not. Either way the finally block will be run.
diff --git a/llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp b/llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp
index 4d6111cc25..0d652faf55 100644
--- a/llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp
+++ b/llvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp
@@ -106,8 +106,8 @@ TEST_F(ScalarEvolutionExpanderTest, ExpandPtrTypeSCEV) {
GetElementPtrInst::Create(I8Ty, Gep0, Ci32, "gep1", Br->getIterator());
GetElementPtrInst *Gep2 = GetElementPtrInst::Create(
I8Ty, UndefPtr, Ci32, "gep2", Br->getIterator());
- CmpInst *Cmp = CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_ULT,
- UndefPtr, Gep0, "cmp", Br->getIterator());
+ CmpInst *Cmp = CmpInst::Create(Instruction::ICmp, CmpInst::ICMP_ULT, UndefPtr,
+ Gep0, "cmp", Br->getIterator());
SelectInst *Select =
SelectInst::Create(Cmp, Gep1, Gep2, "select", Br->getIterator());
``````````
</details>
https://github.com/llvm/llvm-project/pull/102631
More information about the llvm-commits
mailing list