mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +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
|
@ -250,7 +250,7 @@ void appendFullLibPathCandidates(std::vector<std::string> &paths,
|
|||
for (const char *dir : ConfigFile::instance.libDirs()) {
|
||||
llvm::SmallString<128> candidate(dir);
|
||||
llvm::sys::path::append(candidate, filename);
|
||||
paths.push_back(candidate.str());
|
||||
paths.emplace_back(candidate.data(), candidate.size());
|
||||
}
|
||||
|
||||
// for backwards compatibility
|
||||
|
@ -310,7 +310,7 @@ void ArgsBuilder::addASanLinkFlags(const llvm::Triple &triple) {
|
|||
// Add the path to the resource dir to rpath to support using the shared
|
||||
// lib from the default location without copying.
|
||||
args.push_back("-rpath");
|
||||
args.push_back(llvm::sys::path::parent_path(filepath));
|
||||
args.push_back(std::string(llvm::sys::path::parent_path(filepath)));
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -508,7 +508,7 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
|
|||
}
|
||||
|
||||
args.push_back("-o");
|
||||
args.push_back(outputPath);
|
||||
args.push_back(std::string(outputPath));
|
||||
|
||||
addSanitizers(*global.params.targetTriple);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue