How LLVM generates bitcodes(IR) for structure

I searched the source code of LLVM, but I failed to find the exact code slices which show how LLVM generate bitcodes(IR) for structure. I search the keyword 'StructType::create' and 'StructType::get', but there are so many occurrences. Could anyone tell me where to find the exact code slices. My purpose is to change the order of elements in a structure and something else. Thank you.

Answers


The component which is responsible for initially generating the IR is called a front-end. The LLVM core itself does not contain any front-ends, but there are many front-ends written that target it, most famously Clang - a C, C++ and Objective-C front-end for LLVM.

So if by "generate bitcode for structure" you mean "generate bitcode for C structure", then the code responsible for it will be in Clang. Specifically, the CGRecordLayout and CGRecordLayoutBuilder classes are responsible for creating the LLVM struct type.


Need Your Help

ECB: can't access /

emacs cedet emacs-ecb

On updating to Kubuntu 12.04, and Emacs 24.1.50 - I can't access / folder in ecb's tree browser. When I try to get there, or just activate the ecb Emacs opens *tramp/scpc C* buffer and it says:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.