[cfe-dev] View Record Decl in Clang

Tim Pugh via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 6 09:58:13 PST 2019


Hi Clang Devs,

I'm trying to view structs (record decl's) in Clang while compiling a
program.

Where exactly in the src code could I view my struct, preferably in the
earliest instance possible? My goal is to view a struct, and then view the
fields in my struct for some inspection I intend on doing (field decl's).

I also hope to in some manner modify my structs fields, such as swap field
positions. I've worked on a team that used a plugin that swapped some field
positions in a struct where we figured out alignment/padding issues, but
are now looking at doing the same in clang proper. We've been looking at
some previous recommendations, but have been looking in
RecordLayoutBuilder.cpp as of late, which I'm unsure is the correct
location to be trying to swap the field positions.

I'm rather new to the in's and out's of clang/llvm, so any any help would
be appreciated.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190206/7f8da3ef/attachment.html>


More information about the cfe-dev mailing list