[llvm-commits] [llvm] r98663 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Mar 16 13:35:03 PDT 2010
On 16.03.2010, at 21:15, Duncan Sands wrote:
> 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.
Oops, fixed in r98671.
More information about the llvm-commits
mailing list