mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
appendSuffix: don't append a dot when the suffix is empty.
Additionally, move the implementation of appendSuffix to Path.cpp: it is platform-independent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -195,6 +195,21 @@ StringRef Path::GetDLLSuffix() {
|
||||
return &(LTDL_SHLIB_EXT[1]);
|
||||
}
|
||||
|
||||
bool
|
||||
Path::appendSuffix(StringRef suffix) {
|
||||
if (!suffix.empty()) {
|
||||
std::string save(path);
|
||||
path.append(".");
|
||||
path.append(suffix);
|
||||
if (!isValid()) {
|
||||
path = save;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Path::isBitcodeFile() const {
|
||||
std::string actualMagic;
|
||||
|
||||
Reference in New Issue
Block a user