[llvm] r173842 - Made certain small functions in PtrState inlined.

Bill Wendling wendling at apple.com
Tue Jan 29 16:46:55 PST 2013


On Jan 29, 2013, at 2:29 PM, Michael Gottesman <mgottesman at apple.com> wrote:

> Author: mgottesman
> Date: Tue Jan 29 16:29:59 2013
> New Revision: 173842
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=173842&view=rev
> Log:
> Made certain small functions in PtrState inlined.
> 
I thought that methods defined inside of the class automatically get the inline attribute. Are these not being inlined?

-bw

> Modified:
>    llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
> 
> Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp?rev=173842&r1=173841&r2=173842&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp (original)
> +++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp Tue Jan 29 16:29:59 2013
> @@ -451,31 +451,31 @@ namespace {
>     PtrState() : KnownPositiveRefCount(false), Partial(false),
>                  Seq(S_None) {}
> 
> -    void SetKnownPositiveRefCount() {
> +    inline void SetKnownPositiveRefCount() {
>       KnownPositiveRefCount = true;
>     }
> 
> -    void ClearRefCount() {
> +    inline void ClearRefCount() {
>       KnownPositiveRefCount = false;
>     }
> 
> -    bool IsKnownIncremented() const {
> +    inline bool IsKnownIncremented() const {
>       return KnownPositiveRefCount;
>     }
> 
> -    void SetSeq(Sequence NewSeq) {
> +    inline void SetSeq(Sequence NewSeq) {
>       Seq = NewSeq;
>     }
> 
> -    Sequence GetSeq() const {
> +    inline Sequence GetSeq() const {
>       return Seq;
>     }
> 
> -    void ClearSequenceProgress() {
> +    inline void ClearSequenceProgress() {
>       ResetSequenceProgress(S_None);
>     }
> 
> -    void ResetSequenceProgress(Sequence NewSeq) {
> +    inline void ResetSequenceProgress(Sequence NewSeq) {
>       Seq = NewSeq;
>       Partial = false;
>       RRI.clear();
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list