@@ -169,11 +169,11 @@ bool weave_ns::WeaveCommon::insertAfter(Module &m, Function &f, StringRef &a,
169169
170170 if (valid) {
171171 IRBuilder<> builder (inst);
172- Value *v1 = builder.CreateGlobalStringPtr (m.getName (), " str" );
173- Value *v2 = builder.CreateGlobalStringPtr (f.getName (), " str" );
174- Value *v3 = builder.CreateGlobalStringPtr (StringRef (scope), " str" );
175- Value *v4 = builder.CreateGlobalStringPtr (StringRef (flow), " str" );
176- Value *v5 = builder.CreateGlobalStringPtr (StringRef (pcut), " str" );
172+ Value *v1 = builder.CreateGlobalString (m.getName (), " str" );
173+ Value *v2 = builder.CreateGlobalString (f.getName (), " str" );
174+ Value *v3 = builder.CreateGlobalString (StringRef (scope), " str" );
175+ Value *v4 = builder.CreateGlobalString (StringRef (flow), " str" );
176+ Value *v5 = builder.CreateGlobalString (StringRef (pcut), " str" );
177177 std::vector<Value *> args;
178178 args.push_back (ConstantInt::get (Type::getInt32Ty (context), async));
179179 args.push_back (v1);
@@ -216,11 +216,11 @@ bool weave_ns::WeaveCommon::insertBefore(Module &m, Function &f, StringRef &a,
216216 // weaveFuncTy);
217217 auto &entry = f.getEntryBlock ();
218218 IRBuilder<> builder (&entry);
219- Value *v1 = builder.CreateGlobalStringPtr (m.getName (), " str" );
220- Value *v2 = builder.CreateGlobalStringPtr (f.getName (), " str" );
221- Value *v3 = builder.CreateGlobalStringPtr (StringRef (scope), " str" );
222- Value *v4 = builder.CreateGlobalStringPtr (StringRef (flow), " str" );
223- Value *v5 = builder.CreateGlobalStringPtr (StringRef (pcut), " str" );
219+ Value *v1 = builder.CreateGlobalString (m.getName (), " str" );
220+ Value *v2 = builder.CreateGlobalString (f.getName (), " str" );
221+ Value *v3 = builder.CreateGlobalString (StringRef (scope), " str" );
222+ Value *v4 = builder.CreateGlobalString (StringRef (flow), " str" );
223+ Value *v5 = builder.CreateGlobalString (StringRef (pcut), " str" );
224224 builder.SetInsertPoint (&entry, entry.begin ());
225225 std::vector<Value *> args;
226226 args.push_back (ConstantInt::get (Type::getInt32Ty (context), async));
@@ -243,7 +243,7 @@ bool weave_ns::WeaveCommon::instrumentCaliper(Module &M, Function &F)
243243
244244 IRB.SetInsertPoint (Entry.getTerminator ());
245245 std::string FunctionName = F.getName ().str ();
246- auto *FnStr = IRB.CreateGlobalStringPtr (FunctionName);
246+ auto *FnStr = IRB.CreateGlobalString (FunctionName);
247247 IRB.CreateCall (CaliBeginRegion, {FnStr});
248248
249249 bool RetFound = false ;
0 commit comments