[llvm] [NFC] Change FindDbgDeclareUsers interface to match findDbgUsers/values (PR #73498)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 07:57:25 PST 2023


================
@@ -40,7 +40,7 @@ class Module;
 
 /// Finds dbg.declare intrinsics declaring local variables as living in the
 /// memory that 'V' points to.
-TinyPtrVector<DbgDeclareInst *> FindDbgDeclareUses(Value *V);
+void findDbgDeclares(SmallVectorImpl<DbgDeclareInst *> &DbgUsers, Value *V);
----------------
felipepiovezan wrote:

Since this is a transitionary state, this is probably fine. But you know how LLVM's transitionary states can be usually last a few years...

> I chose out-params here for consistency. findDbgValues has always had an out parameter

Consistency is a good argument for sure. It is a bit unfortunate because we had the chance to modify the bad API and make it identical to the good API, instead of changing the good API to match the bad API. Now we have two extra steps before we can have good APIs all around

https://github.com/llvm/llvm-project/pull/73498


More information about the llvm-commits mailing list