[clang] Add a flag to preserve the old macro behaviour. (PR #174895)
Snehasish Kumar via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 8 16:52:14 PST 2026
================
@@ -345,7 +351,10 @@ void CGDebugInfo::setLocation(SourceLocation Loc) {
if (Loc.isInvalid())
return;
- CurLoc = CGM.getContext().getSourceManager().getFileLoc(Loc);
+ if (DebugInfoMacroExpansionLoc)
+ CurLoc = CGM.getContext().getSourceManager().getExpansionLoc(Loc);
+ else
+ CurLoc = CGM.getContext().getSourceManager().getFileLoc(Loc);
----------------
snehasish wrote:
Done.
https://github.com/llvm/llvm-project/pull/174895
More information about the cfe-commits
mailing list