================
@@ -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) {
----------------
Nerixyz wrote:
> Do we currently not use line numbers for debug info at all?
Neither Clang nor GCC generate line numbers for inline assembly:
https://godbolt.org/z/5nr4aqMKb
MSVC does generate line numbers though: https://godbolt.org/z/6Mn73KdWG
https://github.com/llvm/llvm-project/pull/193007
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits