[cfe-commits] r91255 - /cfe/trunk/lib/CodeGen/CGRTTI.cpp

Chris Lattner clattner at apple.com
Sun Dec 13 20:05:47 PST 2009


On Dec 13, 2009, at 3:47 PM, Anders Carlsson wrote:

> Author: andersca
> Date: Sun Dec 13 17:47:29 2009
> New Revision: 91255
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=91255&view=rev
> Log:
> Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.

Nice!

> +    llvm::Constant *Info[] = {
> +      BuildVtableRef(vtbl), BuildName(Ty, Hidden, Extern)

Does it matter that the evaluation order of these two calls is undefined?  Is the order actually undefined in an initializer?

-Chris

> +    };
> +    
>     // We always generate these as hidden, only the name isn't hidden.
> -    return finish(&info[0], info.size(), GV, Name, /*Hidden=*/true, 
> -                  GetLinkageFromExternFlag(Extern));
> +    return finish(&Info[0], llvm::array_lengthof(Info), GV, Name, 
> +                  /*Hidden=*/true, GetLinkageFromExternFlag(Extern));
>   }
> 
>   /// BuildType - Builds the type info for the given type.
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list