[llvm] r227013 - Add visibility attribute for InstCombinePass (r226987).

Benjamin Kramer benny.kra at gmail.com
Sat Jan 24 12:37:12 PST 2015


> On 24.01.2015, at 21:06, Patrik Hagglund <patrik.h.hagglund at ericsson.com> wrote:
> 
> Author: patha
> Date: Sat Jan 24 14:06:53 2015
> New Revision: 227013
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=227013&view=rev
> Log:
> Add visibility attribute for InstCombinePass (r226987).
> 
> Warning by gcc:
> 'llvm::InstCombinePass' declared with greater visibility than the type of its field 'llvm::InstCombinePass::Worklist' [-Wattributes]

This change is incorrect as InstCombinePass is used from tools/opt which may cross a shared library boundary. Please remove the attribute. We probably have to remove it from InstCombineWorklist too to pacify the warning.

- Ben
> 
> Modified:
>    llvm/trunk/include/llvm/Transforms/InstCombine/InstCombine.h
> 
> Modified: llvm/trunk/include/llvm/Transforms/InstCombine/InstCombine.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/InstCombine/InstCombine.h?rev=227013&r1=227012&r2=227013&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Transforms/InstCombine/InstCombine.h (original)
> +++ llvm/trunk/include/llvm/Transforms/InstCombine/InstCombine.h Sat Jan 24 14:06:53 2015
> @@ -24,7 +24,7 @@
> 
> namespace llvm {
> 
> -class InstCombinePass {
> +class LLVM_LIBRARY_VISIBILITY InstCombinePass {
>   InstCombineWorklist Worklist;
> 
> public:
> 
> 
> _______________________________________________
> 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