[lldb-dev] [patch] Add LLDB_API in the API class declaration.

Abid, Hafiz Hafiz_Abid at mentor.com
Thu Mar 13 03:31:58 PDT 2014


Hi Deepak,
I encountered a build error which forced me to add these to class declaration. But I will hold the patch for now and do some more experiments. May be error source was somewhere else. In any case, I think we should add them so that class declarations are consistent with forward declarations.

Thanks,
Abid

> -----Original Message-----
> From: lldb-dev-bounces at cs.uiuc.edu [mailto:lldb-dev-bounces at cs.uiuc.edu]
> On Behalf Of Deepak Panickal
> Sent: 12 March 2014 17:16
> To: lldb-dev at cs.uiuc.edu
> Subject: Re: [lldb-dev] [patch] Add LLDB_API in the API class declaration.
> 
> Hi Abid,
> 
> The LLDB_API define in the SBDefines.h already exports the API to build
> liblldb.dll successfully on Windows.
> 
> Why do they have to be added again to each class declaration?
> 
> Thanks,
> Deepak
> 
> On 12/03/14 16:31, Greg Clayton wrote:
> > Right now LLDB_API is used only for windows and turns into
> __declspec(dllexport) or __declspec(dllimport). The main question is if we
> are going to try and use these for other compiles (like using the GCC
> attribute for visibility). If we ever decide to use the GCC attributes in
> LLDB_API, then we might need one for functions: LLDB_API_FUNCTION and
> one for classes LLDB_API_CLASS.
> >
> > So for now this is fine as the __declspec() works on classes for windows,
> but if we put __attribute__((....)) in there I don't believe this works on class
> definitions to export the entire class...
> >
> > So yes, OK to apply.
> >
> > On Mar 12, 2014, at 9:08 AM, Abid, Hafiz <Hafiz_Abid at mentor.com>
> wrote:
> >
> >> Hi,
> >> This patch add LLDB_API to the class declaration for the API classes. It was
> already present in the forward declaration in SBDefines.h. I need LLDB_API to
> be part of the declaration to build a DLL that exports the API and can be
> successfully linked with driver. This only effects Windows. Ok to apply?
> >>
> >> Regards,
> >> Abid
> >> <api.patch>_______________________________________________
> >> lldb-dev mailing list
> >> lldb-dev at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list