[llvm-branch-commits] [llvm] [mcp-frameinst: 3/4]: [MCP][NFC] Opinionated refactoring using new type (PR #186239)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 13 05:48:29 PDT 2026


================
@@ -94,6 +94,32 @@ static cl::opt<cl::boolOrDefault>
 
 namespace {
 
+struct DefSrcPair {
+  const MachineOperand *Def;
+  const MachineOperand *Src;
+
+  DefSrcPair(const DestSourcePair &DSP)
+      : Def(DSP.Destination), Src(DSP.Source) {}
+
+  static DefSrcPair fromAssert(std::optional<DefSrcPair> DSP) {
+    assert(DSP && "Expected copy instruction");
----------------
arsenm wrote:

Redundant assert, the optional operator will also assert 

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


More information about the llvm-branch-commits mailing list