aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp b/contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp
index fd48d5080ff6..e43f111113b4 100644
--- a/contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/contrib/llvm-project/llvm/lib/MC/WasmObjectWriter.cpp
@@ -1526,8 +1526,7 @@ uint64_t WasmObjectWriter::writeOneObject(MCAssembler &Asm,
StringRef Name = SectionName;
// For user-defined custom sections, strip the prefix
- if (Name.starts_with(".custom_section."))
- Name = Name.substr(strlen(".custom_section."));
+ Name.consume_front(".custom_section.");
MCSymbol *Begin = Sec.getBeginSymbol();
if (Begin) {