Re: Rename IDENTIFIER_NODE in a plugin

2012-10-30 Thread Peter Colberg
On Tue, Oct 30, 2012 at 01:39:59PM -0400, Peter Colberg wrote: > How does one reassign the IDENTIFIER_POINTER of an IDENTIFIER_NODE? My question does not make sense, since identifiers are immutable. I found an alternative solution used throughout the GCC code: DECL_NAME(decl) = get_identifier(

Rename IDENTIFIER_NODE in a plugin

2012-10-30 Thread Peter Colberg
Hello, I am in the process of writing a plugin that parses the header files of a C library using GCC, walks the AST in GENERIC format, and translates to C code for a foreign function interface (for LuaJIT). Many libraries internally use different C type names than those part of the API, using the