[cfe-dev] static const structures declared as "external global %struct.S" instead of "external constant %struct.S"

Robert Lytton robert at xmos.com
Sat Dec 7 07:10:56 PST 2013

Hi Richard, Reid,

Thank you for the replies - much appreciated.
I saw the language reference below, but was unsure if it worked in both directions viz: declarations non const & definitions const.
However, it makes little difference if it is one way or both - the point is I need to fix it (as per Richards Osborne's comments).

thank you

"LLVM explicitly allows declarations of global variables to be marked constant, even if the final definition of the global is not. This capability can be used to enable slightly better optimization of the program, but requires the language definition to guarantee that optimizations based on the ‘constantness’ are valid for the translation units that do not include the definition."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131207/3925b07b/attachment.html>

More information about the cfe-dev mailing list