[cfe-users] Get template instantiation pattern for function declaration

2017-03-22 Thread Vlad via cfe-users
 Hello,I am trying to collect all template instantiations via traversing AST with RecursiveASTVisitor. I thought I would be able to do it with VisitFunctionDecl from class visitor and getTemplateInstantiationPattern from class FunctionDecl. However, as mentioned in the comment to this method, it just returns the function declaration, from wich it could be instantiated. I discovered that this method returns the first acceptable pattern from the context of instantiation. Is there any way to get a real pattern out of a function template instantiation?
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] complie clang with clang

2017-03-22 Thread Masaru Tsuchiyama via cfe-users

Hi.

Thank you for the replay.

I could show the command lines with the following steps.

$ CXX=clang++ CC=clang cmake -G Ninja ../llvm
$ ninja-build -v

But  I want to do this with make.

Could you tell me how?

Rest Regards.

Duncan P. N. Exon Smith wrote:



On 2017-Mar-21, at 06:51, Masaru Tsuchiyama via cfe-users 
 wrote:

Hi.

I'm trying to complie clang with clang.


This should be fairly well documented.  Try these:
   http://clang.llvm.org/get_started.html
   http://llvm.org/docs/CMake.html
   http://llvm.org/docs/AdvancedBuilds.html

It sounds like you're looking for "bootstrap" builds, which is the first thing 
in the third link.


Then I found the site.
http://stackoverflow.com/questions/12479458/how-to-build-clang-with-clang

I want to know whether clang is surely used when compiling clang.
I want it to display command line of clang compilation.

Is there any method to show the exact command line when compiling it.


This depends on your build system.  If you're using Ninja, you can add "-v" to 
the command-line to see what commands are being called.


Best Regards.

--
Masaru Tsuchiyama 
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users






--
Masaru Tsuchiyama 
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] BPF stack limit

2017-03-22 Thread Steven Simpson via cfe-users

Hi,

I'm using Clang to compile C to eBPF, not to run in the Linux kernel, 
but in ubpf.


I occasionally encounter the error "Looks like the BPF stack limit of 
512 bytes is exceeded".  The limit seems to be hard-wired 
(llvm/lib/Target/BPF/BPFRegisterInfo.cpp):


  if (Offset <= -512) {

(I'm using "clang version 5.0.0 (trunk 294090)" built from SVN source.  
Checked it's still there in r298510.)


Is this an intrinsic limit of eBPF, or just one set by the kernel? If 
the latter, and since the kernel isn't the only place BPF could run, 
could an option be added to override it?  (For the moment, I've just 
disabled the check and rebuilt.  Plus there are still some changes to 
try with my code which might avoid the limit.)


Thanks,

Steven
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] complie clang with clang

2017-03-22 Thread Hans Wennborg via cfe-users
I think this should do it:

$ CXX=clang++ CC=clang cmake -G "Unix Makefiles" ../llvm
$ VERBOSE=1 make -j8

On Wed, Mar 22, 2017 at 5:19 AM, Masaru Tsuchiyama via cfe-users
 wrote:
> Hi.
>
> Thank you for the replay.
>
> I could show the command lines with the following steps.
>
> $ CXX=clang++ CC=clang cmake -G Ninja ../llvm
> $ ninja-build -v
>
> But  I want to do this with make.
>
> Could you tell me how?
>
> Rest Regards.
>
>
> Duncan P. N. Exon Smith wrote:
>>
>>
>>> On 2017-Mar-21, at 06:51, Masaru Tsuchiyama via cfe-users
>>>  wrote:
>>>
>>> Hi.
>>>
>>> I'm trying to complie clang with clang.
>>
>>
>> This should be fairly well documented.  Try these:
>>http://clang.llvm.org/get_started.html
>>http://llvm.org/docs/CMake.html
>>http://llvm.org/docs/AdvancedBuilds.html
>>
>> It sounds like you're looking for "bootstrap" builds, which is the first
>> thing in the third link.
>>
>>> Then I found the site.
>>> http://stackoverflow.com/questions/12479458/how-to-build-clang-with-clang
>>>
>>> I want to know whether clang is surely used when compiling clang.
>>> I want it to display command line of clang compilation.
>>>
>>> Is there any method to show the exact command line when compiling it.
>>
>>
>> This depends on your build system.  If you're using Ninja, you can add
>> "-v" to the command-line to see what commands are being called.
>>
>>> Best Regards.
>>>
>>> --
>>> Masaru Tsuchiyama 
>>> ___
>>> cfe-users mailing list
>>> cfe-users@lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>>
>>
>>
>
>
> --
> Masaru Tsuchiyama 
> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users