Skip to content

Commit b7c9cb2

Browse files
committed
Fixed comments OpenMP Offload Toolchain for Flang
1 parent 3fe2a3d commit b7c9cb2

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

lib/Driver/ToolChains/Cuda.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -696,16 +696,10 @@ void CudaToolChain::AddFlangSystemIncludeArgs(const llvm::opt::ArgList &DriverAr
696696
llvm::opt::ArgStringList &Flang1Args) const {
697697
path_list IncludePathList;
698698
const Driver &D = getDriver();
699-
700-
701699
if (DriverArgs.hasArg(options::OPT_nostdinc))
702700
return;
703-
704-
{
705701
SmallString<128> P(D.InstalledDir);
706702
llvm::sys::path::append(P, "../include");
707703
IncludePathList.push_back(P.str());
708-
}
709-
710704
AddFlangSysIncludeArg(DriverArgs, Flang1Args, IncludePathList);
711705
}

lib/Driver/ToolChains/Flang.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "llvm/Support/Process.h"
2929
#include "llvm/Support/TargetParser.h"
3030
#include "llvm/Support/YAMLParser.h"
31-
#include "llvm/Option/ArgList.h"
3231

3332
#ifdef LLVM_ON_UNIX
3433
#include <unistd.h> // For getuid().
@@ -45,7 +44,8 @@ void FlangFrontend::ConstructJob(Compilation &C, const JobAction &JA,
4544
ArgStringList CommonCmdArgs;
4645
ArgStringList UpperCmdArgs;
4746
ArgStringList LowerCmdArgs;
48-
SmallString<256> Stem, Path;
47+
SmallString<256> Stem;
48+
SmallString<256> Path;
4949
std::string OutFile;
5050
bool NeedIEEE = false;
5151
bool NeedFastMath = false;
@@ -921,18 +921,17 @@ if(Args.getAllArgValues(options::OPT_fopenmp_targets_EQ).size() > 0) {
921921

922922
/* OpenMP GPU Offload */
923923
if(Args.getAllArgValues(options::OPT_fopenmp_targets_EQ).size() > 0) {
924-
//if (isa<CompileJobAction>(JA) && JA.isHostOffloading(Action::OFK_OpenMP)) {
925924
SmallString<128> TargetInfo;//("-fopenmp-targets ");
926925
SmallString<256> TargetInfoAsm;//("-fopenmp-targets-asm ");
927926
Path = llvm::sys::path::parent_path(Output.getFilename());
928927

929928
Arg* Tgts = Args.getLastArg(options::OPT_fopenmp_targets_EQ);
930929
assert(Tgts && Tgts->getNumValues() &&
931930
"OpenMP offloading has to have targets specified.");
932-
for (unsigned i = 0; i < Tgts->getNumValues(); ++i) {
931+
for (unsigned i = 0; i != Tgts->getNumValues(); ++i) {
933932
if (i)
934933
TargetInfo += ',';
935-
// We need to get the string from the triple because it may be not exactly
934+
// We need to get the string from the triple because it may not be exactly
936935
// the same as the one we get directly from the arguments.
937936
llvm::Triple T(Tgts->getValue(i));
938937
TargetInfo += T.getTriple();

0 commit comments

Comments
 (0)