Using the GCC IR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 
I want to run g++ on a C++ source file and then WALK the IR generated by GCC to do further processing and finally call the backend to do its job. Basically add a linter to do specific checks in my C++ code.
 
Can I get access to the IR generated by GCC. I know how to dump the IR to file. Is there a way to access the IR in memory (walk the IR).
 
I am interested in :
1. Access all classes/structs in file scope
2. Detailed Type information (base_classes, member routines, member fields, etc)
3. Detail Routine info (statements and expressions)
4. Map objects to their source code decls (file, line, col number)
5. etc,
 
Is it possible. Is there a way to walk the GCC IR? I could not find any info on the web or gnu.org. so I am sending an email to you. This is extremely important for my next project.
 
One alternative I have is to use the EDG (Edison Compile Group) IR. They provide a nice way to walk the IR. Their primary business is frontend. 
 
But I was really hoping I could use GCC IR for it. I am sure something must be out there. Just want to know what.
 
thanks
Rohit


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux