Hello, I need to create a global string constant node. In the past, I have always been able to add global variables, but I have always left them uninitialized. I know the trick is to build_decl() of VAR_DECL and, I guess in this case the type char_node_type. However, I want the global decl initialized and referring to a string literal. I know of build_string_literal() but that does not create a decl node that I am aware of. I am unsure as to how to set that literal to my VAR_DECL instance, so that it is in the read-only section of the resulting binary, and referred to by the identifier I pass to build_decl(). Is there an example in the code my grep-foo has failed me for this specific case?
Thanks much! -Matt