Skip to content

Use starts_with instead of startswith in split-file.cpp#119

Merged
adamdruppe merged 2 commits into
opendlang:masterfrom
QuantumSegfault:split-file-starts-with
Jul 13, 2026
Merged

Use starts_with instead of startswith in split-file.cpp#119
adamdruppe merged 2 commits into
opendlang:masterfrom
QuantumSegfault:split-file-starts-with

Conversation

@QuantumSegfault

Copy link
Copy Markdown
Contributor

StringRef::startswith was deprecated in LLVM 18, and removed in LLVM 19.

It's replacement is StringRef::starts_with (a simple rename/alias), introduced in LLVM 16.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Requesting review
@adamdruppe

This change is enough to allow successful building of LDC with LLVM 19, while still supporting LLVM 17.

I haven't actually tried building with LLVM 17 locally though (I'm doing this to avoid having to install yet another version of LLVM). We'll see if CI passes.

@adamdruppe
adamdruppe merged commit 5642122 into opendlang:master Jul 13, 2026
1 check passed
@adamdruppe

Copy link
Copy Markdown
Contributor

omg if it actually works i might be willing to update the llvm, i just didn't even want to fight with it.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Yeah. I still need to make sure the resulting ldc2 is usable.

They sometimes do things like #189416 which causes runtime breakage without compile-time breakage. So even if LDC builds, it may not be usable. We'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants