[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:09 PST 2026


================
@@ -54,11 +54,17 @@
 #include "llvm/Support/SHA1.h"
 #include "llvm/Support/SHA256.h"
 #include "llvm/Support/TimeProfiler.h"
+#include "llvm/Support/CommandLine.h"
 #include <cstdint>
 #include <optional>
 using namespace clang;
 using namespace clang::CodeGen;
 
+static llvm::cl::opt<bool> DebugInfoMacroExpansionLoc(
+    "debug-info-macro-expansion-loc",
+    llvm::cl::desc("Use expansion location for debug info on macro params"),
+    llvm::cl::init(false));
+
----------------
snehasish wrote:

Done.

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


More information about the cfe-commits mailing list