mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122141 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -32,7 +32,7 @@ using namespace llvmc;
|
||||
namespace llvmc {
|
||||
|
||||
const std::string* LanguageMap::GetLanguage(const sys::Path& File) const {
|
||||
StringRef suf = File.getSuffix();
|
||||
StringRef suf = sys::path::extension(File.str());
|
||||
LanguageMap::const_iterator Lang =
|
||||
this->find(suf.empty() ? "*empty*" : suf);
|
||||
if (Lang == this->end()) {
|
||||
|
@ -43,8 +43,7 @@ namespace {
|
||||
return 0;
|
||||
}
|
||||
else if (SaveTemps == SaveTempsEnum::Obj && !OutputFilename.empty()) {
|
||||
tempDir = OutputFilename;
|
||||
tempDir = tempDir.getDirname();
|
||||
tempDir = sys::path::parent_path(OutputFilename);
|
||||
}
|
||||
else {
|
||||
// SaveTemps == Cwd --> use current dir (leave tempDir empty).
|
||||
|
@ -61,7 +61,7 @@ sys::Path Tool::OutFilename(const sys::Path& In,
|
||||
Out.appendSuffix(OutputSuffix);
|
||||
}
|
||||
else {
|
||||
Out.set(In.getBasename());
|
||||
Out.set(sys::path::stem(In.str()));
|
||||
Out.appendSuffix(OutputSuffix);
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ sys::Path Tool::OutFilename(const sys::Path& In,
|
||||
if (IsJoin())
|
||||
Out = MakeTempFile(TempDir, "tmp", OutputSuffix);
|
||||
else
|
||||
Out = MakeTempFile(TempDir, In.getBasename(), OutputSuffix);
|
||||
Out = MakeTempFile(TempDir, sys::path::stem(In.str()), OutputSuffix);
|
||||
}
|
||||
return Out;
|
||||
}
|
||||
|
Reference in New Issue
Block a user