OSDN Git Service

Move the libcall annotating part from doFinalization to doInitialization.
authorNick Lewycky <nicholas@mxc.ca>
Mon, 5 Jan 2009 00:07:50 +0000 (00:07 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 5 Jan 2009 00:07:50 +0000 (00:07 +0000)
commit51c84b6bd994787ee6cf31b04ef18a44b7004b6a
tree3cbac8c493602f7f673ac8c03b2babe00dd8ca67
parentf54f50a3488ed11bee753b9882f88d2d0f1f4cd3
Move the libcall annotating part from doFinalization to doInitialization.
Finalization occurs after all the FunctionPasses in the group have run, which
is clearly not what we want.

This also means that we have to make sure that we apply the right param
attributes when creating a new function.

Also, add a missed optimization: strdup and strndup. NoCapture and
NoAlias return!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61658 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SimplifyLibCalls.cpp