[llvm] [RemoveDIs] Add iterator-taking constructors and Create methods (PR #82778)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 04:32:07 PST 2024


================
@@ -844,6 +1035,13 @@ class CmpInst : public Instruction {
   void *operator new(size_t S) { return User::operator new(S, 2); }
   void operator delete(void *Ptr) { User::operator delete(Ptr); }
 
+  /// Construct a compare instruction, given the opcode, the predicate and
+  /// the two operands. Insert the instruction into a BasicBlock right before
+  /// the specified instruction.
+  /// Create a CmpInst
+  static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2,
+                         const Twine &Name, BasicBlock::iterator InsertBefore);
----------------
jmorse wrote:

Yarp; I ran `clang-format-patch` and filtered in everything in the newly added functions. Differences with the existing code are because the existing formatting isn't compliant, again to reduce the size of the diff I didn't want those to be updated.

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


More information about the llvm-commits mailing list