@@ -1077,17 +1077,16 @@ void DFSanFunction::addReachesFunctionCallbacksIfEnabled(IRBuilder<> &IRB,
10771077
10781078 if (dbgloc.get () == nullptr ) {
10791079 CILine = llvm::ConstantInt::get (I.getContext (), llvm::APInt (32 , 0 ));
1080- FilePathPtr = IRB.CreateGlobalStringPtr (
1080+ FilePathPtr = IRB.CreateGlobalString (
10811081 I.getFunction ()->getParent ()->getSourceFileName ());
10821082 } else {
10831083 CILine = llvm::ConstantInt::get (I.getContext (),
10841084 llvm::APInt (32 , dbgloc.getLine ()));
1085- FilePathPtr =
1086- IRB.CreateGlobalStringPtr (dbgloc->getFilename ());
1085+ FilePathPtr = IRB.CreateGlobalString (dbgloc->getFilename ());
10871086 }
10881087
10891088 llvm::Value *FunctionNamePtr =
1090- IRB.CreateGlobalStringPtr (I.getFunction ()->getName ());
1089+ IRB.CreateGlobalString (I.getFunction ()->getName ());
10911090
10921091 CallInst *CB;
10931092 std::vector<Value *> args;
@@ -1293,7 +1292,7 @@ void DataFlowSanitizer::buildExternWeakCheckIfNeeded(IRBuilder<> &IRB,
12931292 if (GlobalValue::isExternalWeakLinkage (F->getLinkage ())) {
12941293 std::vector<Value *> Args;
12951294 Args.push_back (F);
1296- Args.push_back (IRB.CreateGlobalStringPtr (F->getName ()));
1295+ Args.push_back (IRB.CreateGlobalString (F->getName ()));
12971296 IRB.CreateCall (DFSanWrapperExternWeakNullFn, Args);
12981297 }
12991298}
@@ -1313,8 +1312,7 @@ DataFlowSanitizer::buildWrapperFunction(Function *F, StringRef NewFName,
13131312 if (F->isVarArg ()) {
13141313 NewF->removeFnAttr (" split-stack" );
13151314 CallInst::Create (DFSanVarargWrapperFn,
1316- IRBuilder<>(BB).CreateGlobalStringPtr (F->getName ()), " " ,
1317- BB);
1315+ IRBuilder<>(BB).CreateGlobalString (F->getName ()), " " , BB);
13181316 new UnreachableInst (*Ctx, BB);
13191317 } else {
13201318 auto ArgIt = pointer_iterator<Argument *>(NewF->arg_begin ());
@@ -3086,7 +3084,7 @@ bool DFSanVisitor::visitWrappedCallBase(Function &F, CallBase &CB) {
30863084 case DataFlowSanitizer::WK_Warning:
30873085 CB.setCalledFunction (&F);
30883086 IRB.CreateCall (DFSF.DFS .DFSanUnimplementedFn ,
3089- IRB.CreateGlobalStringPtr (F.getName ()));
3087+ IRB.CreateGlobalString (F.getName ()));
30903088 DFSF.DFS .buildExternWeakCheckIfNeeded (IRB, &F);
30913089 DFSF.setShadow (&CB, DFSF.DFS .getZeroShadow (&CB));
30923090 DFSF.setOrigin (&CB, DFSF.DFS .ZeroOrigin );
0 commit comments