[cfe-dev] Clang++ 3.4 -fdump-record-layouts not producing any results?

Dun Peal dunpealer at gmail.com
Mon Nov 25 14:40:05 PST 2013


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 at 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 at 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 at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131125/2e051055/attachment.html>


More information about the cfe-dev mailing list