[clang] [llvm] [CodeView] Add line entries for instructions in MS inline asm (PR #193007)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 10:57:51 PDT 2026
================
@@ -2574,16 +2575,43 @@ CodeGenFunction::EmitAsmInput(const TargetInfo::ConstraintInfo &Info,
InputExpr->getExprLoc());
}
+static llvm::MDNode *getAsmSrcLocInfo(ArrayRef<SourceLocation> SourceLocs,
+ CodeGenFunction &CGF) {
+ SmallVector<llvm::Metadata *, 8> Locs;
+ llvm::LLVMContext &Ctx = CGF.getLLVMContext();
+
+ for (SourceLocation Loc : SourceLocs) {
+ llvm::Constant *RawLoc =
+ llvm::ConstantInt::get(CGF.Int64Ty, Loc.getRawEncoding());
+ Locs.push_back(llvm::ConstantAsMetadata::get(RawLoc));
+ }
+
+ if (CGF.getDebugInfo() && CGF.CGM.getCodeGenOpts().EmitCodeView) {
----------------
efriedma-quic wrote:
Why does CodeView need to use a different metadata format compared to DWARF here?
https://github.com/llvm/llvm-project/pull/193007
More information about the cfe-commits
mailing list