File tree 1 file changed +3
-30
lines changed
clang/lib/Driver/ToolChains
1 file changed +3
-30
lines changed Original file line number Diff line number Diff line change @@ -71,37 +71,10 @@ llvm::opt::DerivedArgList *AMDGPUOpenMPToolChain::TranslateArgs(
71
71
72
72
const OptTable &Opts = getDriver ().getOpts ();
73
73
74
- if (DeviceOffloadKind == Action::OFK_OpenMP) {
75
- for (Arg *A : Args) {
76
- if (!shouldSkipSanitizeOption (*this , Args, BoundArch, A) &&
77
- !llvm::is_contained (*DAL, A))
78
- DAL->append (A);
79
- }
80
-
81
- if (!DAL->hasArg (options::OPT_march_EQ)) {
82
- StringRef Arch = BoundArch;
83
- if (Arch.empty ()) {
84
- auto ArchsOrErr = getSystemGPUArchs (Args);
85
- if (!ArchsOrErr) {
86
- std::string ErrMsg =
87
- llvm::formatv (" {0}" , llvm::fmt_consume (ArchsOrErr.takeError ()));
88
- getDriver ().Diag (diag::err_drv_undetermined_gpu_arch)
89
- << llvm::Triple::getArchTypeName (getArch ()) << ErrMsg << " -march" ;
90
- Arch = OffloadArchToString (OffloadArch::HIPDefault);
91
- } else {
92
- Arch = Args.MakeArgString (ArchsOrErr->front ());
93
- }
94
- }
95
- DAL->AddJoinedArg (nullptr , Opts.getOption (options::OPT_march_EQ), Arch);
96
- }
97
-
98
- return DAL;
99
- }
100
-
101
- for (Arg *A : Args) {
102
- if (!llvm::is_contained (*DAL, A))
74
+ for (Arg *A : Args)
75
+ if (!shouldSkipSanitizeOption (*this , Args, BoundArch, A) &&
76
+ !llvm::is_contained (*DAL, A))
103
77
DAL->append (A);
104
- }
105
78
106
79
if (!BoundArch.empty ()) {
107
80
DAL->eraseArg (options::OPT_march_EQ);
You can’t perform that action at this time.
0 commit comments