@@ -1077,17 +1077,16 @@ void DFSanFunction::addReachesFunctionCallbacksIfEnabled(IRBuilder<> &IRB,
1077
1077
1078
1078
if (dbgloc.get() == nullptr) {
1079
1079
CILine = llvm::ConstantInt::get(I.getContext(), llvm::APInt(32, 0));
1080
- FilePathPtr = IRB.CreateGlobalStringPtr (
1080
+ FilePathPtr = IRB.CreateGlobalString (
1081
1081
I.getFunction()->getParent()->getSourceFileName());
1082
1082
} else {
1083
1083
CILine = llvm::ConstantInt::get(I.getContext(),
1084
1084
llvm::APInt(32, dbgloc.getLine()));
1085
- FilePathPtr =
1086
- IRB.CreateGlobalStringPtr(dbgloc->getFilename());
1085
+ FilePathPtr = IRB.CreateGlobalString(dbgloc->getFilename());
1087
1086
}
1088
1087
1089
1088
llvm::Value *FunctionNamePtr =
1090
- IRB.CreateGlobalStringPtr (I.getFunction()->getName());
1089
+ IRB.CreateGlobalString (I.getFunction()->getName());
1091
1090
1092
1091
CallInst *CB;
1093
1092
std::vector<Value *> args;
@@ -1293,7 +1292,7 @@ void DataFlowSanitizer::buildExternWeakCheckIfNeeded(IRBuilder<> &IRB,
1293
1292
if (GlobalValue::isExternalWeakLinkage(F->getLinkage())) {
1294
1293
std::vector<Value *> Args;
1295
1294
Args.push_back(F);
1296
- Args.push_back(IRB.CreateGlobalStringPtr (F->getName()));
1295
+ Args.push_back(IRB.CreateGlobalString (F->getName()));
1297
1296
IRB.CreateCall(DFSanWrapperExternWeakNullFn, Args);
1298
1297
}
1299
1298
}
@@ -1313,8 +1312,7 @@ DataFlowSanitizer::buildWrapperFunction(Function *F, StringRef NewFName,
1313
1312
if (F->isVarArg()) {
1314
1313
NewF->removeFnAttr("split-stack");
1315
1314
CallInst::Create(DFSanVarargWrapperFn,
1316
- IRBuilder<>(BB).CreateGlobalStringPtr(F->getName()), "",
1317
- BB);
1315
+ IRBuilder<>(BB).CreateGlobalString(F->getName()), "", BB);
1318
1316
new UnreachableInst(*Ctx, BB);
1319
1317
} else {
1320
1318
auto ArgIt = pointer_iterator<Argument *>(NewF->arg_begin());
@@ -3086,7 +3084,7 @@ bool DFSanVisitor::visitWrappedCallBase(Function &F, CallBase &CB) {
3086
3084
case DataFlowSanitizer::WK_Warning:
3087
3085
CB.setCalledFunction(&F);
3088
3086
IRB.CreateCall(DFSF.DFS.DFSanUnimplementedFn,
3089
- IRB.CreateGlobalStringPtr (F.getName()));
3087
+ IRB.CreateGlobalString (F.getName()));
3090
3088
DFSF.DFS.buildExternWeakCheckIfNeeded(IRB, &F);
3091
3089
DFSF.setShadow(&CB, DFSF.DFS.getZeroShadow(&CB));
3092
3090
DFSF.setOrigin(&CB, DFSF.DFS.ZeroOrigin);
0 commit comments