[llvm-commits] CVS: llvm/include/llvm/GlobalValue.h

Chris Lattner clattner at apple.com
Sat Apr 21 23:44:48 PDT 2007


> Index: llvm/include/llvm/GlobalValue.h
> diff -u llvm/include/llvm/GlobalValue.h:1.36 llvm/include/llvm/ 
> GlobalValue.h:1.37
> --- llvm/include/llvm/GlobalValue.h:1.36	Mon Apr 16 23:31:29 2007
> +++ llvm/include/llvm/GlobalValue.h	Sat Apr 21 10:29:13 2007
> @@ -55,8 +55,10 @@
>    }
>
>    Module *Parent;
> -  LinkageTypes Linkage : 4;   // The linkage of this global
> -  VisibilityTypes Visibility : 1;  // The visibility style of this  
> global
> +  // Note: VC++ treats enums as signed, so an extra bit is  
> required to prevent
> +  // Linkage and Visibility from turning into negative values.
> +  LinkageTypes Linkage : 5;   // The linkage of this global
> +  VisibilityTypes Visibility : 2;  // The visibility style of this  
> global
>    unsigned Alignment : 16;    // Alignment of this symbol, must be  
> power of two
>    std::string Section;        // Section to emit this into, empty  
> mean default
>  public:

Please change the enum type to "unsigned Visibility : 1", and add a  
cast to the getVisibility() accessor.

Thanks,

-Chris



More information about the llvm-commits mailing list