<div dir="ltr">I'm not sure how long make takes to run if there's nothing to compile. But you should definitely check out cmake + ninja.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 10:52 AM, Xiaohui Chen <span dir="ltr"><<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">yes, i know, the makefile will skip compiling the code if i do not change them, but it will still <br>go through some directories and say "nothing to do" i guess.<br><br>it is ok, i can use the current solution. Thank you!<div class="HOEnZb"><div class="h5"><br><br><span>On 11/06/14, <b>Nikola Smiljanic </b> <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite"><div><div dir="ltr">How will it waste time if you don't change it?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 9:53 AM, Xiaohui Chen <span dir="ltr"><<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am writing a source to source tool which need to add some new keywords in the clang source file, so this tool can parse <br>the input file with my new keywords, now this tool is still under developing and  debugging, each time when i want to <br>recompile this tool  i do not want to involve llvm stuff, because it will waste some time......<div><div><br><br><span>On 11/06/14, <b>Nikola Smiljanic </b> <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite"><div><div dir="ltr">Why exactly do you want an out of source build if your using makefiles? It's beneficial with Visual Studio but I don't see the reason for it if you're building from the command line?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 9:14 AM, Xiaohui Chen <span dir="ltr"><<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">.... i have no idea of cmake ....<br><br>i use makefile under linux, so who could help?<div><div><br><br><span>On 11/06/14, <b>Nikola Smiljanic </b> <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite"><div><div dir="ltr">I only know how to do this with cmake.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 8:32 AM, Xiaohui Chen <span dir="ltr"><<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">i think i get your point and that is what i expect.<br><br>you mean that:<br><br>1. make a standalone directory for Clang not in llvm/tools<br><br>2. compile both llvm and clang as usual<br><br>3. if i modify Clang source file, i just execute the Makefile inside clang/ directory, so it<br>will just re-compile the Clang file  without checking llvm files<br><br>is there any instructions to do this? <br><br>Especially in step 2, if i compile in this way i guess i will break the dependence relationship in "configure" file?<br><br>Best <br><span><font color="#888888">xiaohui</font></span><div><div><br><br><span>On 11/06/14, <b>Nikola Smiljanic </b> <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite"><div><div dir="ltr">The best you can do is compile clang "out of source". Meaning the clang directory stands on its own and not in llvm/projects. This makes a difference if you're generating Visual Studio solution file as you won't have to load llvm projects. But llvm must be built.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 4:24 AM, Jingyue Wu <span dir="ltr"><<a href="mailto:jingyue@google.com" target="_blank">jingyue@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't think so. clang uses a lot of LLVM's core libraries. <span><font color="#888888"><br><br><div>Jingyue</div></font></span><div><div><br><div class="gmail_quote">On Thu Nov 06 2014 at 9:14:49 AM Xiaohui Chen <<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all:<br><br>I am writing a source to source tool and adding new keywords in the clang source file(i just care about the AST), <br>is there a way to just compile the clang frontend source file but not including llvm source file?<br><br>Sincerely<br>xiaohui  <br><br><span>On 11/03/14, <b>Nikola Smiljanic </b> <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 4, 2014 at 7:14 AM, Xiaohui Chen <span dir="ltr"><<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for your reply.<br><br>I am confusing here:<span><br><br>1. Traverse method visits AST nodes that form a tree. CXXRecordDecl is the parent of each of its CXXMethodDecls and FieldDecls.<br><br></span> CXXMethodDecls ( FieldDecls )  is not  a member of CXXRecordDecl and also does not inherit from CXXRecordDecl, so how could<br>you define them as parent-child relationship?</blockquote><div><br></div><div>CXXRecordDecl contains CXXMethodDecls and RecordDecl contains FieldDecls. They're just stored in the DeclContext class but are exposed with method_begin/method_end and field_begin/field_end.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>2. WalkUpFrom method visits the class hierarchy of a single AST node. CXXRecordDecl inherits RecordDecl which inherits TagDecl etc.<br><br></span>here TagDecl has three direct parents, so will WalkUpFrom be applied to these three classes?<br><br></blockquote><div><br></div><div>TagDecl does have three super classes but only one of them is also an AST node. AST is built from declarations, statements and types. DeclContext represents a declaration context and structs/classes introduce one. They are also redeclarable (forward declaration) which is what Redeclarable class keeps track of.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">sincerely<span><font color="#888888"><br>xiaohui</font></span><div><div><br><br><span>On 11/03/14, <b>Nikola Smiljanic </b> <<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite"><div><div dir="ltr">There are two parent-child relationships at play.<div><br></div><div>1. Traverse method visits AST nodes that form a tree. CXXRecordDecl is the parent of each of its CXXMethodDecls and FieldDecls. This is what you'll see with clang -cc1 -ast-dump</div><div>2. WalkUpFrom method visits the class hierarchy of a single AST node. CXXRecordDecl inherits RecordDecl which inherits TagDecl etc. Think of serialization, to serialize CXXRecordDecl you'd first want to serialize everything from the base class and so on recursively.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 12:32 PM, Xiaohui Chen <span dir="ltr"><<a href="mailto:xchen422@uwo.ca" target="_blank">xchen422@uwo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Dear all:<br><span><div><br>I am using Clang as the frontend of my project, but i am confusing of the following statements.<br>PS: i am a newbie. <br><br><pre><span>These tasks are done by three groups of methods, respectively:</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00089"></a>00089 <span>///   1. TraverseDecl(Decl *x) does task #1.  It is the entry point</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00090"></a>00090 <span>///      for traversing an AST rooted at x.  This method simply</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00091"></a>00091 <span>///      dispatches (i.e. forwards) to TraverseFoo(Foo *x) where Foo</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00092"></a>00092 <span>///      is the dynamic type of *x, which calls WalkUpFromFoo(x) and</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00093"></a>00093 <span>///      then recursively visits the child nodes of x.</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00094"></a>00094 <span>///      TraverseStmt(Stmt *x) and TraverseType(QualType x) work</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00095"></a>00095 <span>///      similarly.</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00096"></a>00096 <span>///   2. WalkUpFromFoo(Foo *x) does task #2.  It does not try to visit</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00097"></a>00097 <span>///      any child node of x.  Instead, it first calls WalkUpFromBar(x)</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00098"></a>00098 <span>///      where Bar is the direct parent class of Foo (unless Foo has</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00099"></a>00099 <span>///      no parent), and then calls VisitFoo(x) (see the next list item).</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00100"></a>00100 <span>///   3. VisitFoo(Foo *x) does task #3.</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00101"></a>00101 <span>///</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00102"></a>00102 <span>/// These three method groups are tiered (Traverse* > WalkUpFrom* ></span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00103"></a>00103 <span>/// Visit*).  A method (e.g. Traverse*) may call methods from the same</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00104"></a>00104 <span>/// tier (e.g. other Traverse*) or one tier lower (e.g. WalkUpFrom*).</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00105"></a>00105 <span>/// It may not call methods from a higher tier.</span></pre>According to the above statement, the calling relationship between these<br>functions are organized in this way in general:<br><br>Traversal*()<br>{<br>        .......<br>        WalkUpFrom*();<br>        .......<br>}<br><br>WalkUpFrom*()<br>{<br>         .......<br>         Visit*();<br>         .......<br><br>}<br><br>am i right?<br><br>For this statement:<br><pre>00096 <span>///   2. WalkUpFromFoo(Foo *x) does task #2.  It does not try to visit</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00097"></a>00097 <span>///      any child node of x.  Instead, it first calls WalkUpFromBar(x)</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00098"></a>00098 <span>///      where Bar is the direct parent class of Foo (unless Foo has</span>
<a name="1498785a0356c1d7_14987505ac1199fd_149872c0d1b48f44_1498706daaa17355_149862cb4af790d9_msg-f:1484043415893042809_149774a86dc8444d_1497396fe06534f4_l00099"></a>00099 <span>///      no parent), and then calls VisitFoo(x) (see the next list item).</span></pre>what do you mean by saying "the direct parent class of Foo"?<br>why i need to visit the parent class before i visit the current class? <br>what is the purpose? Could you please give me a short example?<br><br>Thank you in advance!<br><br>Sincerely<span><font color="#888888"><br>xiaohui<br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</font></span></div><br><br></span>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</div></blockquote>
</div></div></blockquote></div><br></div></div>
</div></blockquote>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</div></blockquote>
</div></div></blockquote></div><br></div>
</div></blockquote>
</div></div></blockquote></div><br></div>
</div></blockquote>
</div></div></blockquote></div><br></div>
</div></blockquote>
</div></div></blockquote></div><br></div>