mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-13 22:48:43 +03:00
Avoid deprecations with LLVM 18 wrt. renamed llvm::StringRef::{starts,ends}with()
This commit is contained in:
parent
e728075594
commit
3beb68904f
9 changed files with 70 additions and 0 deletions
|
@ -636,6 +636,10 @@ void ArgsBuilder::addLinker() {
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ArgsBuilder::addUserSwitches() {
|
||||
#if LDC_LLVM_VER >= 1800
|
||||
#define startswith starts_with
|
||||
#endif
|
||||
|
||||
// additional linker and cc switches (preserve order across both lists)
|
||||
for (unsigned ilink = 0, icc = 0;;) {
|
||||
unsigned linkpos = ilink < opts::linkerSwitches.size()
|
||||
|
@ -664,6 +668,10 @@ void ArgsBuilder::addUserSwitches() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if LDC_LLVM_VER >= 1800
|
||||
#undef startswith
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue