Skip to content

Commit

Permalink
claim X args
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Kosmynin committed Jul 3, 2019
1 parent e9a17ff commit a6d4b7e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CGOpenMPRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3884,7 +3884,7 @@ CGOpenMPRuntime::createOffloadingBinaryDescriptorRegistration() {

// We should be creating an offloading descriptor only if there are devices
// specified.
assert(!Devices.empty() && "No OpenMP offloading devices??");
//assert(!Devices.empty() && "No OpenMP offloading devices??");

// Create the external variables that will point to the begin and end of the
// host entries section. These will be defined by the linker.
Expand Down
6 changes: 6 additions & 0 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,12 @@ void tools::claimNoWarnArgs(const ArgList &Args) {
Args.ClaimAllArgs(options::OPT_flto_EQ);
Args.ClaimAllArgs(options::OPT_flto);
Args.ClaimAllArgs(options::OPT_fno_lto);

for(auto A : Args) {
if(A->getOption().getName() == "X" && std::string(A->getValue(0)).compare(0,13,"openmp-target") == 0){
A->claim();
}
}
}

Arg *tools::getLastProfileUseArg(const ArgList &Args) {
Expand Down
3 changes: 2 additions & 1 deletion clang/lib/Driver/ToolChains/NECAuroraOffload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ void necauroratools::Common::ConstructJob(Compilation &C, const JobAction &JA,
continue;
}

if (A->getOption().getName() == "X" && std::string(A->getValue(0)).compare(0,13,"openmp-target") == 0) {
if (A->getOption().getName() == "X") {
A->claim();
continue;
}

Expand Down

0 comments on commit a6d4b7e

Please sign in to comment.