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 origin/main HEAD --extensions h,cpp,c --
clang/lib/CodeGen/CGCUDANV.cpp clang/lib/Driver/ToolChains/Linux.cpp
clang/lib/Driver/ToolChains/MSVC.cpp
compiler-rt/lib/profile/InstrProfilingFile.c
compiler-rt/lib/profile/InstrProfilingPlatformROCm.cpp
llvm/include/llvm/ProfileData/InstrProf.h
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 73ad33738..6f6ad8912 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -2008,18 +2008,18 @@ static GlobalVariable
*emitGPUOffloadSectionsStruct(Module &M,
// Section bounds are hidden i8 markers; raw_version is an i64 constant.
auto *I8 = Type::getInt8Ty(Ctx);
auto Hidden = GlobalValue::HiddenVisibility;
- Constant *Fields[] = {
- Extern("__start___llvm_prf_names", I8, false, Hidden),
- Extern("__stop___llvm_prf_names", I8, false, Hidden),
- Extern("__start___llvm_prf_cnts", I8, false, Hidden),
- Extern("__stop___llvm_prf_cnts", I8, false, Hidden),
- Extern("__start___llvm_prf_data", I8, false, Hidden),
- Extern("__stop___llvm_prf_data", I8, false, Hidden),
- Extern("__llvm_profile_raw_version", Type::getInt64Ty(Ctx), true,
- GlobalValue::DefaultVisibility)};
+ Constant *Fields[] = {Extern("__start___llvm_prf_names", I8, false, Hidden),
+ Extern("__stop___llvm_prf_names", I8, false, Hidden),
+ Extern("__start___llvm_prf_cnts", I8, false, Hidden),
+ Extern("__stop___llvm_prf_cnts", I8, false, Hidden),
+ Extern("__start___llvm_prf_data", I8, false, Hidden),
+ Extern("__stop___llvm_prf_data", I8, false, Hidden),
+ Extern("__llvm_profile_raw_version",
+ Type::getInt64Ty(Ctx), true,
+ GlobalValue::DefaultVisibility)};
auto *PtrTy = PointerType::get(Ctx, AS);
- auto *STy = StructType::get(
- Ctx, {PtrTy, PtrTy, PtrTy, PtrTy, PtrTy, PtrTy, PtrTy});
+ auto *STy =
+ StructType::get(Ctx, {PtrTy, PtrTy, PtrTy, PtrTy, PtrTy, PtrTy, PtrTy});
auto *GV = new GlobalVariable(M, STy, /*isConstant=*/true,
GlobalValue::ExternalLinkage,
ConstantStruct::get(STy, Fields), Name,
nullptr,
@@ -2085,8 +2085,8 @@ void InstrLowerer::emitNameData() {
// Emit the device sections struct only when this TU produced profile data,
so
// its section start/stop references are backed by a real section.
- bool HasData = llvm::any_of(
- ProfileDataMap, [](const auto &KV) { return KV.second.DataVar; });
+ bool HasData = llvm::any_of(ProfileDataMap,
+ [](const auto &KV) { return KV.second.DataVar;
});
if (!GPUCUIDPostfix.empty() && HasData)
if (GlobalVariable *GV = emitGPUOffloadSectionsStruct(M, GPUCUIDPostfix))
CompilerUsedVars.push_back(GV);
``````````
</details>
https://github.com/llvm/llvm-project/pull/202095
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits