@@ -68,13 +68,13 @@ void IUEntryInsertion::validateAndFinalizeSection(Function *EntryFn,
68
68
#define IU_PROG_TYPE_1 (ty_enum, ty_name, sec ) \
69
69
case ty_enum: \
70
70
ProgObj->setSection (" obj" #ty_name); \
71
- assert (EntryFn->getSection ().startswith (sec) && " invalid section name" ); \
71
+ assert (EntryFn->getSection ().starts_with (sec) && " invalid section name" ); \
72
72
break ;
73
73
#define IU_PROG_TYPE_2 (ty_enum, ty_name, sec1, sec2 ) \
74
74
case ty_enum: \
75
75
ProgObj->setSection (" obj" #ty_name); \
76
- assert ((EntryFn->getSection ().startswith (sec1) || \
77
- EntryFn->getSection ().startswith (sec2)) && \
76
+ assert ((EntryFn->getSection ().starts_with (sec1) || \
77
+ EntryFn->getSection ().starts_with (sec2)) && \
78
78
" invalid section name" ); \
79
79
break ;
80
80
#include " llvm/Transforms/InnerUnikernels/IUProgType.def"
@@ -165,7 +165,7 @@ bool IUEntryInsertion::runOnModule(Module &M) const {
165
165
166
166
// Traverse all Global variables
167
167
for (GlobalVariable &G : M.globals ()) {
168
- if (G.hasSection () && G.getSection ().startswith (" inner_unikernel" )) {
168
+ if (G.hasSection () && G.getSection ().starts_with (" inner_unikernel" )) {
169
169
Constant *Init = G.getInitializer ();
170
170
auto *CS = cast<ConstantStruct>(Init);
171
171
@@ -266,7 +266,7 @@ bool IUEntryInsertion::instrumentStack(Module &M, LLVMContext &C) const {
266
266
for (auto &F : M) {
267
267
std::string Demangled;
268
268
nonMicrosoftDemangle (F.getName ().data (), Demangled);
269
- if (StringRef (Demangled).startswith (StringRef (" inner_unikernel_rt::" )))
269
+ if (StringRef (Demangled).starts_with (StringRef (" inner_unikernel_rt::" )))
270
270
continue ;
271
271
for (auto &I : instructions (F)) {
272
272
if (auto *CI = dyn_cast<CallBase>(&I)) {
0 commit comments