[llvm-commits] [llvm] r98663 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Duncan Sands
baldrick at free.fr
Tue Mar 16 13:15:37 PDT 2010
Hi Benjamin,
> + } else if (Name == "strchr" ||
> + Name == "strrchr") {
> + if (FTy->getNumParams() != 2 ||
> + !FTy->getParamType(0)->isPointerTy() ||
> + !FTy->getParamType(1)->isIntegerTy())
> + continue;
> + setOnlyReadsMemory(F);
> + setDoesNotThrow(F);
> + setDoesNotCapture(F, 1);
since strchr returns its pointer argument (offset a bit, usually), that
means that it is captured.
Ciao,
Duncan.
More information about the llvm-commits
mailing list