[llvm-commits] [llvm] r150607 - in /llvm/trunk: include/llvm/CodeGen/DFAPacketizer.h lib/CodeGen/DFAPacketizer.cpp

Andrew Trick atrick at apple.com
Wed Feb 15 16:11:28 PST 2012


On Feb 15, 2012, at 2:38 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:

> On Wed, Feb 15, 2012 at 14:23, Andrew Trick <atrick at apple.com> wrote:
>> On Feb 15, 2012, at 1:07 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:
>> 
>>> On Wed, Feb 15, 2012 at 10:55, Andrew Trick <atrick at apple.com> wrote:
>>>> 
>>>> +
>>>> +namespace llvm {
>>>> +// DefaultVLIWScheduler - This class extends ScheduleDAGInstrs and overrides
>>>> +// Schedule method to build the dependence graph.
>>>> +class DefaultVLIWScheduler : public ScheduleDAGInstrs {
>>> 
>>> Should this have LLVM_LIBRARY_VISIBILITY? GCC complains thusly:
>>> lib/CodeGen/DFAPacketizer.cpp:106:7: error:
>>> 'llvm::DefaultVLIWScheduler' declared with greater visibility than the
>>> type of its field 'llvm::DefaultVLIWScheduler::<anonymous>'
>>> [-Werror=attributes]
>>> lib/CodeGen/DFAPacketizer.cpp:106:7: error:
>>> 'llvm::DefaultVLIWScheduler' declared with greater visibility than its
>>> base 'llvm::ScheduleDAGInstrs' [-Werror=attributes]
>>> 
>>> (Shame on GCC for that first diagnostic. Shame on Clang for no diagnostics...)
>>> 
>>> -Matt
>> 
>> Thanks!  Fixed in r150619.
> 
> Cool, thanks. Now I'm seeing this, though:
> include/llvm/CodeGen/DFAPacketizer.h:89:7: error:
> 'llvm::VLIWPacketizerList' declared with greater visibility than the
> type of its field 'llvm::VLIWPacketizerList::VLIWScheduler'
> [-Werror=attributes]

Trial and error. Neither of the compilers built on my system give me the diagnostic with -Werror=attributes, which means I'm sure to miss something like this again.

Now I see the issue is deeper than namespaces. I added some encapsulation in r150633.

Sundeep, hopefully this works for you. If it doesn't, we'll work out a new solution.

-Andy



More information about the llvm-commits mailing list