[clang] [flang] [Flang][Sanitizer] Support sanitizer flag for Flang Driver. (PR #137759)
Tarun Prabhu via cfe-commits
cfe-commits at lists.llvm.org
Thu May 15 08:31:18 PDT 2025
================
@@ -11,17 +11,46 @@
//===----------------------------------------------------------------------===//
#include "flang/Frontend/CodeGenOptions.h"
+#include "llvm/TargetParser/Triple.h"
#include <optional>
#include <string.h>
namespace Fortran::frontend {
+using namespace llvm;
+
CodeGenOptions::CodeGenOptions() {
#define CODEGENOPT(Name, Bits, Default) Name = Default;
#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default);
#include "flang/Frontend/CodeGenOptions.def"
}
+// Check if ASan should use GC-friendly instrumentation for globals.
----------------
tarunprabhu wrote:
It looks like this and much of the other code here has been copied from `clang`. If the code is identical to what is in `clang`, it should be shared rather than copied. Such code can be moved somewhere in `llvm/include/llvm/Frontend` and `llvm/lib/Frontend/`. See #136098 for some suggestions. That PR is still awaiting approval from the clang developers, but I don't anticipate any major objections.
https://github.com/llvm/llvm-project/pull/137759
More information about the cfe-commits
mailing list