Skip to content

Commit 5c4ef2a

Browse files
committed
[flang-rt] Fix format.
1 parent 2e83801 commit 5c4ef2a

File tree

7 files changed

+19
-27
lines changed

7 files changed

+19
-27
lines changed

clang/lib/Driver/ToolChain.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,6 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
781781
if (Path.empty())
782782
Path = P;
783783
}
784-
if (getTriple().isOSAIX())
785-
Path.clear();
786784

787785
// Check the filename for the old layout if the new one does not exist.
788786
CRTBasename = buildCompilerRTBasename(Args, Component, Type,

clang/lib/Driver/ToolChains/AVR.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,10 @@ Tool *AVRToolChain::buildLinker() const {
424424
return new tools::AVR::Linker(getTriple(), *this);
425425
}
426426

427-
std::string
428-
AVRToolChain::getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
429-
FileType Type = ToolChain::FT_Static,
430-
bool IsFortran) const {
427+
std::string AVRToolChain::getCompilerRT(const llvm::opt::ArgList &Args,
428+
StringRef Component,
429+
FileType Type = ToolChain::FT_Static,
430+
bool IsFortran) const {
431431
assert(Type == ToolChain::FT_Static && "AVR only supports static libraries");
432432
// Since AVR can never be a host environment, its compiler-rt library files
433433
// should always have ".a" suffix, even on windows.

clang/lib/Driver/ToolChains/Darwin.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,9 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
227227
// Return the full path of the compiler-rt library on a non-Darwin MachO
228228
// system. Those are under
229229
// <resourcedir>/lib/darwin/macho_embedded/<...>(.dylib|.a).
230-
std::string
231-
getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
232-
FileType Type = ToolChain::FT_Static,
233-
bool IsFortran = false) const override;
230+
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
231+
FileType Type = ToolChain::FT_Static,
232+
bool IsFortran = false) const override;
234233

235234
/// }
236235
/// @name ToolChain Implementation
@@ -408,10 +407,9 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public AppleMachO {
408407

409408
// Return the full path of the compiler-rt library on a Darwin MachO system.
410409
// Those are under <resourcedir>/lib/darwin/<...>(.dylib|.a).
411-
std::string
412-
getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
413-
FileType Type = ToolChain::FT_Static,
414-
bool IsFortran = false) const override;
410+
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
411+
FileType Type = ToolChain::FT_Static,
412+
bool IsFortran = false) const override;
415413

416414
protected:
417415
/// }

clang/lib/Driver/ToolChains/MipsLinux.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ void MipsLLVMToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
118118
}
119119

120120
std::string MipsLLVMToolChain::getCompilerRT(const ArgList &Args,
121-
StringRef Component,
122-
FileType Type,
121+
StringRef Component, FileType Type,
123122
bool IsFortran) const {
124123
SmallString<128> Path(getDriver().ResourceDir);
125124
llvm::sys::path::append(Path, SelectedMultilibs.back().osSuffix(), "lib" + LibSuffix,

clang/lib/Driver/ToolChains/MipsLinux.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
3737
void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
3838
llvm::opt::ArgStringList &CmdArgs) const override;
3939

40-
std::string
41-
getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
42-
FileType Type = ToolChain::FT_Static,
43-
bool IsFortran = false) const override;
40+
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
41+
FileType Type = ToolChain::FT_Static,
42+
bool IsFortran = false) const override;
4443

4544
std::string computeSysRoot() const override;
4645

clang/lib/Driver/ToolChains/OHOS.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ class LLVM_LIBRARY_VISIBILITY OHOS : public Generic_ELF {
5656
std::string computeSysRoot() const override;
5757
std::string getDynamicLinker(const llvm::opt::ArgList &Args) const override;
5858

59-
std::string
60-
getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
61-
FileType Type = ToolChain::FT_Static,
62-
bool IsFortran = false) const override;
59+
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
60+
FileType Type = ToolChain::FT_Static,
61+
bool IsFortran = false) const override;
6362

6463
const char *getDefaultLinker() const override {
6564
return "ld.lld";

clang/lib/Driver/ToolChains/OpenBSD.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,8 @@ std::string OpenBSD::getCompilerRT(const ArgList &Args, StringRef Component,
380380
return std::string(Path);
381381
}
382382
SmallString<128> P(getDriver().ResourceDir);
383-
std::string CRTBasename =
384-
buildCompilerRTBasename(Args, Component, Type, /*AddArch=*/false,
385-
IsFortran);
383+
std::string CRTBasename = buildCompilerRTBasename(
384+
Args, Component, Type, /*AddArch=*/false, IsFortran);
386385
llvm::sys::path::append(P, "lib", CRTBasename);
387386
// Checks if this is the base system case which uses a different location.
388387
if (getVFS().exists(P))

0 commit comments

Comments
 (0)