[LLVMdev] Variable declarations vs. definitions
Dustin Laurence
dllaurence at dslextreme.com
Sat Jan 9 17:48:02 PST 2010
On 01/09/2010 01:11 PM, Eli Friedman wrote:
> The syntax isn't entirely obvious...
Thanks, if it doesn't seem as stupid as I feel, I'll grovel less. :-)
> ...usually, when you're wondering
> how to write something in IR, the easiest thing to so is write the
> equivalent C code, then use http://llvm.org/demo/index.cgi to see what
> it looks like in iR.
So *that's* why there is a web demo. :-)
I think I've actually blocked out the C rules because I've been
religiously hiding all variables behind C++ accessors for so long now.
I think the last time I made a practice of declaring variables in .h
files ANSI C was too newfangled to depend on compiler support. :-)
In fact I wouldn't now except my goal is knowledge and I'm willing to
bend design rules a bit to make sure I try new things. That is part of
the motivation behind my plan to use invoke/unwind in the parser, in
fact. It'll make for nicer code, but I'm so used to propagating errors
back up the stack that I'm used to the pain.
If I do that well enough, anytime I want to remember how to do something
I can go back and see how I did it on this project.
Dustin
More information about the llvm-dev
mailing list