[LLVMdev] API CHANGE: create*() --> Create

Gabor Greif gabor at mac.com
Fri May 16 13:56:17 PDT 2008


Hi all,

I have checked in the API change for the classes
BinaryOperator, CmpInst and CastInst, that upper-
cases all methods that begin with "create".

As announced (<http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-May/ 
014636.html>)
the legacy API is still in place. If you observe something to the
contrary, please alert me and I shall fix it.

Please note that LLVM 2.3 will have an unfortunate mixture
of "create" and "Create", we intend to improve the situation for
2.4 with this change.

I intend to leave the old API in place until well after the 2.3 release,
so you can make the transition to the new API after you have committed
yourself to 2.4 completely.

Below you can find a tcsh script to ease the transition in your sources.

I offer to use it to convert llvm-gcc and clang with it in the next  
days,
if there is no opposition.

I shall also take care of the tutorials and other documentation
I have commit privileges for.

Cheers and keep on hacking,

	Gabor


################## tcsh script follows ##################

foreach CLASS (BinaryOperator CmpInst CastInst)
setenv SUBST1 "s/${CLASS}::create/${CLASS}::Create/g"
setenv SUBST2 "s/llvm::${CLASS}::create/llvm::${CLASS}::Create/g"
foreach i (`find . -name "*.cpp"`)
sed -e "$SUBST1" -e "$SUBST2" < $i > $i.2
rm $i
mv $i.2 $i
end
foreach i (`find . -name "*.h"`)
sed -e "$SUBST1" -e "$SUBST2" < $i > $i.2
rm $i
mv $i.2 $i
end
end




More information about the llvm-dev mailing list