diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-02 03:37:46 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-02 03:37:46 +0800 |
| commit | a8a9d7d926202450645deae872d4d9dc11d63215 (patch) | |
| tree | 16a3640a93e3f567ff31045969c02a42e1f467e0 /backend/lib/CodeGen/MachineFunctionCloner.cpp | |
| parent | 49d70380a6a95e4039f6b5e5ccce09671d5b4796 (diff) | |
| download | rcc-project-a8a9d7d926202450645deae872d4d9dc11d63215.tar.gz rcc-project-a8a9d7d926202450645deae872d4d9dc11d63215.tar.xz | |
[CodeGen] Model machine debug metadata
Replace marker-based metadata operands with scoped references and inline DIExpression values. Add structured DILocation chains, instruction debug attachments, stack variable records, and entry values with unified verification, builder support, and deterministic cloning.
Diffstat (limited to 'backend/lib/CodeGen/MachineFunctionCloner.cpp')
| -rw-r--r-- | backend/lib/CodeGen/MachineFunctionCloner.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/lib/CodeGen/MachineFunctionCloner.cpp b/backend/lib/CodeGen/MachineFunctionCloner.cpp index e12e33e..dcf9712 100644 --- a/backend/lib/CodeGen/MachineFunctionCloner.cpp +++ b/backend/lib/CodeGen/MachineFunctionCloner.cpp @@ -386,6 +386,12 @@ cloneMemOperand(const MachineMemOperand &SourceOperand, CloneState &State) { if (SourceInstruction->sourceLocation()) { NewInstruction->setSourceLocation(*SourceInstruction->sourceLocation()); } + if (SourceInstruction->debugLocation()) { + auto DebugLocationResult = + NewInstruction->setDebugLocation(*SourceInstruction->debugLocation()); + if (!DebugLocationResult) + return std::unexpected(DebugLocationResult.error()); + } if (SourceInstruction->origin()) NewInstruction->setOrigin(*SourceInstruction->origin()); if (SourceInstruction->debugInstrNumber() != 0) { |
