[llvm] [NFC][DebugInfo] Deprecate iterator-taking moveBefore and getFirstNonPHI (PR #124290)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 06:49:18 PST 2025
================
@@ -280,14 +280,27 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
/// When adding instructions to the beginning of the basic block, they should
/// be added before the returned value, not before the first instruction,
/// which might be PHI. Returns 0 is there's no non-PHI instruction.
- const Instruction* getFirstNonPHI() const;
- Instruction* getFirstNonPHI() {
+ ///
+ /// Deprecated in favour of getFirstNonPHIIt, which returns an iterator that
+ /// preserves some debugging information.
+ LLVM_DEPRECATED("Use iterators as instruction positions", "getFirstNonPHIIt")
+ const Instruction *getFirstNonPHI() const;
+ LLVM_DEPRECATED("Use iterators as instruction positions instead",
----------------
RKSimon wrote:
Aren't we only supposed to add LLVM_DEPRECATED once all uses have been removed from trunk as it breaks Werror builds? I've always took LLVM_DEPRECATED as a signal for downstream branches?
https://github.com/llvm/llvm-project/pull/124290
More information about the llvm-commits
mailing list