[llvm] Add -verify-with-context option to enable better reporting of verifier errors (PR #84867)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 20:39:45 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 725a0523a18ef1a75a6d4a010dc3debe1b08c9d1 bd577b79826acd68ec744ad3510fec0d909648ad -- llvm/include/llvm/IR/InstVisitor.h llvm/lib/IR/Verifier.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/IR/InstVisitor.h b/llvm/include/llvm/IR/InstVisitor.h
index 89e7daf506..657ab50473 100644
--- a/llvm/include/llvm/IR/InstVisitor.h
+++ b/llvm/include/llvm/IR/InstVisitor.h
@@ -81,7 +81,8 @@ struct DefaultCtxManager {
void popCtx() {}
};
-template<typename SubClass, typename RetTy=void, typename CtxManager = DefaultCtxManager>
+template <typename SubClass, typename RetTy = void,
+ typename CtxManager = DefaultCtxManager>
class InstVisitor {
CtxManager *ctxMgr;
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 0c57acb755..d6a71ac777 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -154,9 +154,7 @@ struct VerifierCtxManager {
CurInstNumInThisBlock = 0;
ContextPath.emplace_back(V);
}
- void popCtx() {
- ContextPath.pop_back();
- }
+ void popCtx() { ContextPath.pop_back(); }
void printCtx(raw_ostream &OS, bool NL = false) {
if (ContextPath.empty())
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/84867
More information about the llvm-commits
mailing list