Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Zac Hansen via cfe-users
While it generates some ugly code I found it easier to simply use the canonical names for all types. I spent tens of hours fighting this and never found a good way. On Tuesday, September 27, 2016, Michael via cfe-users < cfe-users@lists.llvm.org> wrote: > Nobody? Wrong list? Any insight in this

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Perevalov Alexey via cfe-users
От: Dr D. Chisnall от имени David Chisnall Отправлено: 27 сентября 2016 г. 10:42 Кому: Perevalov Alexey Копия: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org Тема: Re: [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big   On 26 Sep 2016, at 14:33, Pe

Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Michael via cfe-users
I had a look into the clang sources. It seems this little patch would "fix" the problem. This was pure guess work, I don't know what consequences this might have. Index: lib/AST/TypePrinter.cpp === --- lib/AST/TypePrinter.cpp (

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Mehdi Amini via cfe-users
Sent from my iPhone > On Sep 27, 2016, at 12:06 AM, Perevalov Alexey > wrote: > > > > > > > > > От: mehdi.am...@apple.com от имени Mehdi Amini > > Отправлено: 27 сентября 2016 г. 8:46 > Кому: Perevalov Alexey > Копия: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org > Тема: Re: [ll

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread David Chisnall via cfe-users
On 26 Sep 2016, at 14:33, Perevalov Alexey via llvm-dev wrote: > > Could somebody point me where to solve that problem, is it AST > generation stage, or linkage stage or maybe it's not a problem and just LTO > could be solution here? First, please don’t expect the sizes for different ru

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Mehdi Amini via cfe-users
> On Sep 26, 2016, at 6:33 AM, Perevalov Alexey via llvm-dev > wrote: > > Dear community, > > > I'm using gnustep runtime -fobjc-runtime=gnustep with gnustep-libobjc2 > (https://github.com/gnustep/libobjc2) and > > Cocotron/Chameleon. > > For following source file > > #import >

Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Michael via cfe-users
> I think you want to get the underlying type from the typedef and then use getTypeSpelling on that result. Hmm, I don't think so, I actually would like to keep the typedefs in my generated code (for readability, and because it might actually resolve to something different when the generated c

Re: [cfe-users] What are the ll lines starting with '!0', '!1', etc? How to retrieve them?

2016-09-27 Thread Hugh Perkins via cfe-users
(Oh i see, the NamedMDNode contains MDNodes ) On Tue, Sep 27, 2016 at 3:22 PM, Hugh Perkins wrote: > In the IR text, I see lines like: > > !0 = !{void (float*)* @_Z11somekernel1Pf, !"kernel", i32 1} > !1 = !{void (float*)* @_Z3fooPf, !"kernel", i32 1} > > What are these? How to retrieve them, g

[cfe-users] Fwd: clang/llvm 3.9 bug

2016-09-27 Thread Christophe Duvernois via cfe-users
Hi, Please find attached a short c test program which does not behave correctly with clang 3.9. I'm running ubuntu 16.04 64bit clang bug.c ./a.out for gcc 5.4.0 / clang3.8 output: 1 1 0 1 1 1 0 1 ./a.out for clang3.9 output: 0 0 0 0 0 0 0 0 Is that a regression? Regards, Christophe #include #i

[cfe-users] What are the ll lines starting with '!0', '!1', etc? How to retrieve them?

2016-09-27 Thread Hugh Perkins via cfe-users
In the IR text, I see lines like: !0 = !{void (float*)* @_Z11somekernel1Pf, !"kernel", i32 1} !1 = !{void (float*)* @_Z3fooPf, !"kernel", i32 1} What are these? How to retrieve them, given eg a Module *. I've tried iterating over the global variables, named metadata, and aliases, but nothing.

Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Adam McLaughlin via cfe-users
Hi Michael, I haven't used libclang much (my use case requires LibTooling) but I think you want to get the underlying type from the typedef and then use getTypeSpelling on that result. Basically you want to check if CXType.kind is CXType_Typedef and if so, get the underlying type (which in this ca

Re: [cfe-users] libclang: Spelling on typedefs lacks namespaces

2016-09-27 Thread Michael via cfe-users
Nobody? Wrong list? Any insight in this would be greatly appreciated. Thanks Michael On 08/30/2016 07:00 PM, Michael via cfe-users wrote: Hi Hope I picked the right place for this kind of problem, if not please let me know. I'm using libclang to parse header files and generate code from th

Re: [cfe-users] [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big

2016-09-27 Thread Perevalov Alexey via cfe-users
От: mehdi.am...@apple.com от имени Mehdi Amini Отправлено: 27 сентября 2016 г. 8:46 Кому: Perevalov Alexey Копия: cfe-users@lists.llvm.org; llvm-...@lists.llvm.org Тема: Re: [llvm-dev] objc object file generated for gnustep runtime for ELF target is too big   > On Sep 26, 2016, at 6: