Use the multiple argument form of path::append.
llvm-svn: 185164
This commit is contained in:
parent
13f89cd19b
commit
17381a0627
|
@ -222,9 +222,7 @@ void DarwinClang::AddLinkARCArgs(const ArgList &Args,
|
|||
SmallString<128> P(getDriver().ClangExecutable);
|
||||
llvm::sys::path::remove_filename(P); // 'clang'
|
||||
llvm::sys::path::remove_filename(P); // 'bin'
|
||||
llvm::sys::path::append(P, "lib");
|
||||
llvm::sys::path::append(P, "arc");
|
||||
llvm::sys::path::append(P, "libarclite_");
|
||||
llvm::sys::path::append(P, "lib", "arc", "libarclite_");
|
||||
// Mash in the platform.
|
||||
if (isTargetIOSSimulator())
|
||||
P += "iphonesimulator";
|
||||
|
@ -242,9 +240,7 @@ void DarwinClang::AddLinkRuntimeLib(const ArgList &Args,
|
|||
const char *DarwinStaticLib,
|
||||
bool AlwaysLink) const {
|
||||
SmallString<128> P(getDriver().ResourceDir);
|
||||
llvm::sys::path::append(P, "lib");
|
||||
llvm::sys::path::append(P, "darwin");
|
||||
llvm::sys::path::append(P, DarwinStaticLib);
|
||||
llvm::sys::path::append(P, "lib", "darwin", DarwinStaticLib);
|
||||
|
||||
// For now, allow missing resource libraries to support developers who may
|
||||
// not have compiler-rt checked out or integrated into their build (unless
|
||||
|
@ -539,9 +535,7 @@ void DarwinClang::AddCXXStdlibLibArgs(const ArgList &Args,
|
|||
// Check in the sysroot first.
|
||||
if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) {
|
||||
SmallString<128> P(A->getValue());
|
||||
llvm::sys::path::append(P, "usr");
|
||||
llvm::sys::path::append(P, "lib");
|
||||
llvm::sys::path::append(P, "libstdc++.dylib");
|
||||
llvm::sys::path::append(P, "usr", "lib", "libstdc++.dylib");
|
||||
|
||||
if (!llvm::sys::fs::exists(P.str())) {
|
||||
llvm::sys::path::remove_filename(P);
|
||||
|
@ -577,8 +571,7 @@ void DarwinClang::AddCCKextLibArgs(const ArgList &Args,
|
|||
// only present in the gcc lib dir, which makes it hard to find).
|
||||
|
||||
SmallString<128> P(getDriver().ResourceDir);
|
||||
llvm::sys::path::append(P, "lib");
|
||||
llvm::sys::path::append(P, "darwin");
|
||||
llvm::sys::path::append(P, "lib", "darwin");
|
||||
|
||||
// Use the newer cc_kext for iOS ARM after 6.0.
|
||||
if (!isTargetIPhoneOS() || isTargetIOSSimulator() ||
|
||||
|
|
|
@ -852,9 +852,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
|
|||
llvm::sys::path::remove_filename(P); // Remove /bin from foo/bin
|
||||
|
||||
// Get foo/lib/clang/<version>/include
|
||||
llvm::sys::path::append(P, "lib");
|
||||
llvm::sys::path::append(P, "clang");
|
||||
llvm::sys::path::append(P, CLANG_VERSION_STRING);
|
||||
llvm::sys::path::append(P, "lib", "clang", CLANG_VERSION_STRING);
|
||||
}
|
||||
|
||||
return P.str();
|
||||
|
|
|
@ -507,8 +507,7 @@ ModuleMap::inferFrameworkModule(StringRef ModuleName,
|
|||
|
||||
// Look for an umbrella header.
|
||||
SmallString<128> UmbrellaName = StringRef(FrameworkDir->getName());
|
||||
llvm::sys::path::append(UmbrellaName, "Headers");
|
||||
llvm::sys::path::append(UmbrellaName, ModuleName + ".h");
|
||||
llvm::sys::path::append(UmbrellaName, "Headers", ModuleName + ".h");
|
||||
const FileEntry *UmbrellaHeader = FileMgr.getFile(UmbrellaName);
|
||||
|
||||
// FIXME: If there's no umbrella header, we could probably scan the
|
||||
|
@ -1324,10 +1323,8 @@ static void appendSubframeworkPaths(Module *Mod,
|
|||
return;
|
||||
|
||||
// Add Frameworks/Name.framework for each subframework.
|
||||
for (unsigned I = Paths.size() - 1; I != 0; --I) {
|
||||
llvm::sys::path::append(Path, "Frameworks");
|
||||
llvm::sys::path::append(Path, Paths[I-1] + ".framework");
|
||||
}
|
||||
for (unsigned I = Paths.size() - 1; I != 0; --I)
|
||||
llvm::sys::path::append(Path, "Frameworks", Paths[I-1] + ".framework");
|
||||
}
|
||||
|
||||
/// \brief Parse a header declaration.
|
||||
|
@ -1378,15 +1375,13 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken,
|
|||
appendSubframeworkPaths(ActiveModule, PathName);
|
||||
|
||||
// Check whether this file is in the public headers.
|
||||
llvm::sys::path::append(PathName, "Headers");
|
||||
llvm::sys::path::append(PathName, FileName);
|
||||
llvm::sys::path::append(PathName, "Headers", FileName);
|
||||
File = SourceMgr.getFileManager().getFile(PathName);
|
||||
|
||||
if (!File) {
|
||||
// Check whether this file is in the private headers.
|
||||
PathName.resize(PathLength);
|
||||
llvm::sys::path::append(PathName, "PrivateHeaders");
|
||||
llvm::sys::path::append(PathName, FileName);
|
||||
llvm::sys::path::append(PathName, "PrivateHeaders", FileName);
|
||||
File = SourceMgr.getFileManager().getFile(PathName);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue