Skip to content

Commit 71e42ce

Browse files
Revert "[OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain."
1 parent 46ea14d commit 71e42ce

File tree

2 files changed

+2
-72
lines changed

2 files changed

+2
-72
lines changed

clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ AMDGPUOpenMPToolChain::AMDGPUOpenMPToolChain(const Driver &D,
3737
// Lookup binaries into the driver directory, this is used to
3838
// discover the 'amdgpu-arch' executable.
3939
getProgramPaths().push_back(getDriver().Dir);
40-
// Diagnose unsupported sanitizer options only once.
41-
if (!Args.hasFlag(options::OPT_fgpu_sanitize, options::OPT_fno_gpu_sanitize,
42-
true))
43-
return;
44-
for (auto *A : Args.filtered(options::OPT_fsanitize_EQ)) {
45-
SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false);
46-
if (K != SanitizerKind::Address)
47-
D.getDiags().Report(clang::diag::warn_drv_unsupported_option_for_target)
48-
<< A->getAsString(Args) << getTriple().str();
49-
}
5040
}
5141

5242
void AMDGPUOpenMPToolChain::addClangTargetOptions(
@@ -82,11 +72,9 @@ llvm::opt::DerivedArgList *AMDGPUOpenMPToolChain::TranslateArgs(
8272
const OptTable &Opts = getDriver().getOpts();
8373

8474
if (DeviceOffloadKind == Action::OFK_OpenMP) {
85-
for (Arg *A : Args) {
86-
if (!shouldSkipSanitizeOption(*this, Args, BoundArch, A) &&
87-
!llvm::is_contained(*DAL, A))
75+
for (Arg *A : Args)
76+
if (!llvm::is_contained(*DAL, A))
8877
DAL->append(A);
89-
}
9078

9179
if (!DAL->hasArg(options::OPT_march_EQ)) {
9280
StringRef Arch = BoundArch;

clang/test/Driver/amdgpu-openmp-sanitize-options.c

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)