Skip to content

Commit 807f048

Browse files
committed
Refactor prefix replacement.
1 parent c7f7886 commit 807f048

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/HipStdPar/HipStdPar.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ PreservedAnalyses HipStdParMathFixupPass::run(Module &M,
430430

431431
ToReplace.emplace_back(&F, N);
432432
llvm::replace(ToReplace.back().second, '.', '_');
433-
ToReplace.back().second.replace(0, sizeof("llvm"), "__hipstdpar_");
433+
StringRef Prefix = "llvm";
434+
ToReplace.back().second.replace(0, Prefix.size(), "__hipstdpar");
434435
}
435436
for (auto &&F : ToReplace)
436437
F.first->replaceAllUsesWith(

0 commit comments

Comments
 (0)