mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Fix StringRef conversion for LLVM 11 (777180a32b61070a10dd330b4f038bf24e916af1) (#3305)
This commit is contained in:
parent
97e0d978ee
commit
0a007a55f8
13 changed files with 31 additions and 28 deletions
|
@ -37,29 +37,29 @@ const string &exe_path::getExePath() {
|
|||
|
||||
string exe_path::getBinDir() {
|
||||
assert(!exePath.empty());
|
||||
return path::parent_path(exePath);
|
||||
return string(path::parent_path(exePath));
|
||||
}
|
||||
|
||||
string exe_path::getBaseDir() {
|
||||
string binDir = getBinDir();
|
||||
assert(!binDir.empty());
|
||||
return path::parent_path(binDir);
|
||||
return string(path::parent_path(binDir));
|
||||
}
|
||||
|
||||
string exe_path::getLibDir() {
|
||||
llvm::SmallString<128> r(getBaseDir());
|
||||
path::append(r, "lib" LDC_LIBDIR_SUFFIX);
|
||||
return r.str();
|
||||
return {r.data(), r.size()};
|
||||
}
|
||||
|
||||
string exe_path::prependBinDir(const llvm::Twine &suffix) {
|
||||
llvm::SmallString<128> r(getBinDir());
|
||||
path::append(r, suffix);
|
||||
return r.str();
|
||||
return {r.data(), r.size()};
|
||||
}
|
||||
|
||||
string exe_path::prependLibDir(const llvm::Twine &suffix) {
|
||||
llvm::SmallString<128> r(getLibDir());
|
||||
path::append(r, suffix);
|
||||
return r.str();
|
||||
return {r.data(), r.size()};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue