[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Clang++ 3.4 -fdump-record-layouts not producing any results?
From:       Reid Kleckner <rnk () google ! com>
Date:       2013-11-25 23:09:22
Message-ID: CACs=tyKqbU6s5HkYHLUOkYixh_Zgj25fSUbeOcoveoBmBAhEcw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


cc1 flags are not documented, including -fdump-record-layouts.  Go figure.
 :)


On Mon, Nov 25, 2013 at 2:40 PM, Dun Peal <dunpealer@gmail.com> wrote:

> Thanks, guys. -emit-llvm-only seems to do the trick, with the added
> benefit of suppressing the generation of object files.
>
> Where are these flags documented?  I looked through both `man clang` and
> the online User Manual[1], and neither mentioned those flags.
>
> [1] http://clang.llvm.org/docs/UsersManual.html
>
>
> On Mon, Nov 25, 2013 at 2:05 PM, Reid Kleckner <rnk@google.com> wrote:
>
>> The -cc1 command appears to default to -fsyntax-only, so you want to pass
>> -emit-llvm-only or -emit-obj.  If you do -fsyntax-only, we don't have to
>> compute record layout in your example, so we don't dump it.
>>
>>
>> On Mon, Nov 25, 2013 at 1:44 PM, Dun Peal <dunpealer@gmail.com> wrote:
>>
>>> I'm trying to dump the record layout on Xubuntu 13.04, using official
>>> APT binaries for latest stable 3.4. Unfortunately, it doesn't seem to
>>> produce any results, as you can see from the following trivial example. Am
>>> I doing it wrong?
>>>
>>> $ cat test.cc
>>> class Tester {
>>>     int foo;
>>> };
>>>
>>> int main() {
>>>     Tester test;
>>>     return 0;
>>> }
>>> $ clang -cc1 -v -fdump-record-layouts test.cc
>>> clang -cc1 version 3.4 based upon LLVM 3.4 default target
>>> x86_64-pc-linux-gnu
>>> #include "..." search starts here:
>>> End of search list.
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev@cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>
>>>
>>
>

[Attachment #5 (text/html)]

<div dir="ltr">cc1 flags are not documented, including -fdump-record-layouts.  Go \
figure.  :)<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On \
Mon, Nov 25, 2013 at 2:40 PM, Dun Peal <span dir="ltr">&lt;<a \
href="mailto:dunpealer@gmail.com" target="_blank">dunpealer@gmail.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" \
style="font-family:&#39;courier new&#39;,monospace">Thanks, guys. -emit-llvm-only \
seems to do the trick, with the added benefit of suppressing the generation of object \
files.</div>

<div class="gmail_default" style="font-family:&#39;courier \
new&#39;,monospace"><br></div><div class="gmail_default" \
style="font-family:&#39;courier new&#39;,monospace">Where are these flags documented? \
I looked through both `man clang` and the online User Manual[1], and neither \
mentioned those flags.</div>

<div class="gmail_default" style="font-family:&#39;courier \
new&#39;,monospace"><br></div><div class="gmail_default" \
style="font-family:&#39;courier new&#39;,monospace">[1] <a \
href="http://clang.llvm.org/docs/UsersManual.html" style="font-family:arial" \
target="_blank">http://clang.llvm.org/docs/UsersManual.html</a></div>

</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div \
class="gmail_quote">On Mon, Nov 25, 2013 at 2:05 PM, Reid Kleckner <span \
dir="ltr">&lt;<a href="mailto:rnk@google.com" \
target="_blank">rnk@google.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div dir="ltr">The -cc1 command appears to default to \
-fsyntax-only, so you want to pass -emit-llvm-only or -emit-obj.  If you do \
-fsyntax-only, we don&#39;t have to compute record layout in your example, so we \
don&#39;t dump it.</div>


<div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Mon, Nov 25, 2013 \
at 1:44 PM, Dun Peal <span dir="ltr">&lt;<a href="mailto:dunpealer@gmail.com" \
target="_blank">dunpealer@gmail.com</a>&gt;</span> wrote:<br>

</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div> <div dir="ltr"><div class="gmail_default" \
style="font-family:&#39;courier new&#39;,monospace">I&#39;m trying to dump the record \
layout on Xubuntu 13.04, using official APT binaries for latest stable 3.4. \
Unfortunately, it doesn&#39;t seem to produce any results, as you can see from the \
following trivial example. Am I doing it wrong?</div>



<div class="gmail_default" style="font-family:&#39;courier \
new&#39;,monospace"><br></div><div class="gmail_default"><div class="gmail_default">$ \
cat test.cc </div><div class="gmail_default">class Tester {</div><div \
class="gmail_default">



    int foo;</div><div class="gmail_default">};</div><div \
class="gmail_default"><br></div><div class="gmail_default">int main() {</div><div \
class="gmail_default">    Tester test; </div><div class="gmail_default">    return \
0;</div>



<div class="gmail_default">}</div><div class="gmail_default">$ clang -cc1 -v \
-fdump-record-layouts test.cc </div><div class="gmail_default">clang -cc1 version 3.4 \
based upon LLVM 3.4 default target x86_64-pc-linux-gnu</div>



<div class="gmail_default">#include &quot;...&quot; search starts here:</div><div \
class="gmail_default">End of search list.</div></div></div> \
<br></div></div><div>_______________________________________________<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></div></blockquote></div><br></div> </blockquote></div><br></div>
</div></div></blockquote></div><br></div>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic