[llvm] [SandboxIR] Adds BasicBlock and adds functionality to Function and Context (PR #97637)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 12:41:51 PDT 2024
================
@@ -205,6 +210,53 @@ class Constant : public sandboxir::User {
#endif
};
+/// The BasicBlock::iterator.
+class BBIterator {
+public:
+ using difference_type = std::ptrdiff_t;
+ using value_type = Instruction;
+ using pointer = value_type *;
+ using reference = value_type &;
+ using iterator_category = std::bidirectional_iterator_tag;
+
+private:
+ llvm::BasicBlock *BB;
+ llvm::BasicBlock::iterator It;
+ Context *Ctx;
+ pointer getI(llvm::BasicBlock::iterator It) const;
----------------
vporpo wrote:
Renamed it to `getInstr()`.
https://github.com/llvm/llvm-project/pull/97637
More information about the llvm-commits
mailing list