[llvm] [DebugInfo][RemoveDIs] Support finding DPValues as well as dbg.values in findDbgValues (PR #71952)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 08:08:46 PST 2023
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 51916f0c924f2ed4e970dd043a14d70b6b1d3f71 e37fe1fd8d7c73960f40298a381c2d9e72d45468 -- llvm/include/llvm/IR/DebugInfo.h llvm/lib/IR/DebugInfo.cpp llvm/lib/IR/DebugInfoMetadata.cpp llvm/lib/IR/Value.cpp llvm/lib/IR/Verifier.cpp llvm/unittests/IR/DebugInfoTest.cpp llvm/unittests/IR/ValueTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h
index 5d6e8c2fd28d..96f8a7386ffb 100644
--- a/llvm/include/llvm/IR/DebugInfo.h
+++ b/llvm/include/llvm/IR/DebugInfo.h
@@ -43,12 +43,12 @@ class Module;
TinyPtrVector<DbgDeclareInst *> FindDbgDeclareUses(Value *V);
/// Finds the llvm.dbg.value intrinsics describing a value.
-void findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues,
- Value *V, SmallVectorImpl<DPValue *> *DPValues = nullptr);
+void findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues, Value *V,
+ SmallVectorImpl<DPValue *> *DPValues = nullptr);
/// Finds the debug info intrinsics describing a value.
-void findDbgUsers(SmallVectorImpl<DbgVariableIntrinsic *> &DbgInsts,
- Value *V, SmallVectorImpl<DPValue *> *DPValues = nullptr);
+void findDbgUsers(SmallVectorImpl<DbgVariableIntrinsic *> &DbgInsts, Value *V,
+ SmallVectorImpl<DPValue *> *DPValues = nullptr);
/// Find subprogram that is enclosing this scope.
DISubprogram *getDISubprogram(const MDNode *Scope);
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 6d22b442944a..bcf5837681a3 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -66,8 +66,8 @@ TinyPtrVector<DbgDeclareInst *> llvm::FindDbgDeclareUses(Value *V) {
}
template <typename IntrinsicT>
-static void findDbgIntrinsics(SmallVectorImpl<IntrinsicT *> &Result,
- Value *V, SmallVectorImpl<DPValue *> *DPValues) {
+static void findDbgIntrinsics(SmallVectorImpl<IntrinsicT *> &Result, Value *V,
+ SmallVectorImpl<DPValue *> *DPValues) {
// This function is hot. Check whether the value has any metadata to avoid a
// DenseMap lookup.
if (!V->isUsedByMetadata())
@@ -119,8 +119,8 @@ static void findDbgIntrinsics(SmallVectorImpl<IntrinsicT *> &Result,
}
}
-void llvm::findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues,
- Value *V, SmallVectorImpl<DPValue *> *DPValues) {
+void llvm::findDbgValues(SmallVectorImpl<DbgValueInst *> &DbgValues, Value *V,
+ SmallVectorImpl<DPValue *> *DPValues) {
findDbgIntrinsics<DbgValueInst>(DbgValues, V, DPValues);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/71952
More information about the llvm-commits
mailing list