Performance samples for LibreOffice ...
Stephan Bergmann
sbergman at redhat.com
Thu Sep 11 23:25:10 PDT 2014
On 09/11/2014 08:27 PM, Jan Hubicka wrote:
>> On 09/11/2014 07:05 AM, Jan Hubicka wrote:
>>> Anyway those are warning I currently get with ODR type merging. The first three are
>>> quite puzzling - the type layout differs, but by abstract field so I am unable to print
>>> out any resonable message. This may suggest difference in virtual inheritance or someting like
>>> that (or just plain bug in my code comparing types). I will dig deeper into it tomorrow.
>> [...]
>>> /aux/hubicka/libreoffice/i18npool/inc/nativenumbersupplier.hxx:33:0: warning: type ‘struct NativeNumberSupplier’ violates one definition rule [-Wodr]
>>> class NativeNumberSupplier : public cppu::WeakImplHelper2
>>> ^
>>> /aux/hubicka/libreoffice/50-lto/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/i18n/NativeNumberSupplier.hpp:29:0: note: a type with different memory representation is defined in another translation unit
>>> class NativeNumberSupplier {
>>> ^
>>> /aux/hubicka/libreoffice/50-lto/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/i18n/OrdinalSuffix.hpp:29:0: warning: type ‘struct OrdinalSuffix’ violates one definition rule [-Wodr]
>>> class OrdinalSuffix {
>>> ^
>>> /aux/hubicka/libreoffice/i18npool/inc/ordinalsuffix.hxx:28:0: note: a type with different memory representation is defined in another translation unit
>>> class OrdinalSuffix : public cppu::WeakImplHelper2
>>> ^
>>> /aux/hubicka/libreoffice/50-lto/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/i18n/TextConversion.hpp:29:0: warning: type ‘struct TextConversion’ violates one definition rule [-Wodr]
>>> class TextConversion {
>>> ^
>>> /aux/hubicka/libreoffice/i18npool/inc/textconversion.hxx:36:0: note: a type with different memory representation is defined in another translation unit
>>> class TextConversion: public cppu::WeakImplHelper2
>>> ^
>>
>> Those three are indeed clashes with cppumaker-generated C++ classes
>> corresponding to UNOIDL (new-style) services. The clashes have been
>> fixed now as <cgit.freedesktop.org/libreoffice/core/commit/?id=91ba527a63f77658ee147515f1699792059aa2e5>, <http://cgit.freedesktop.org/libreoffice/core/commit/?id=a6104092925a6fe9f96ca239c0292bd1539d5746>, <http://cgit.freedesktop.org/libreoffice/core/commit/?id=63bc11b81f8af188564a385c1e501fd7334c343d>
>> "Avoid name clash with generated C++ class corresponding to UNOIDL
>> service."
>
> Cool, would you mind showing me how they are different? I could try to improve the error message to be bit more informative then.
Completely different. ;)
While the "hand-written" class in i18npool/inc/nativenumbersupplier.hxx
has member variables (direct ones as well as ones inherited from the
base class template instantiation) along with member functions,
> class NativeNumberSupplier: public cppu::WeakImplHelper2<css::i18n::XNativeNumberSupplier, css::lang::XServiceInfo> {
> public:
> // ...
>
> private:
> css::lang::Locale aLocale;
> bool useOffset;
> };
the cppumaker-generated class in
workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/i18n/NativeNumberSupplier.hpp
only has a static member function and no member variables at all (so is
serving as kind of a poor-man's namespace),
> class NativeNumberSupplier {
> public:
> static css::uno::Reference<css::i18n::XNativeNumberSupplier> create(css::uno::Reference<css::uno::XComponentContext> const & the_context);
>
> private:
> NativeNumberSupplier(); // not implemented
> NativeNumberSupplier(NativeNumberSupplier &); // not implemented
> ~NativeNumberSupplier(); // not implemented
> void operator =(NativeNumberSupplier); // not implemented
> };
Stephan
More information about the LibreOffice
mailing list