[cfe-dev] handling of volatile qualifier

Cédric Venet cedric.venet at laposte.net
Sun Jun 8 05:11:07 PDT 2008


Hi,

Here is a more complete implementation. There is style a lot of fixme,
mainly in ObjC and Builtin because I don't know enough about this to do the
right thing. I didn't run the test since I don't think I can do it on
windows (without cygwin). I don't really know how to do testcase, but
attached is a file that I used for testing my change and the result.

> Nice work.  Just a few minor issues: One, the white-space in argument
> lists is a bit inconsistent.

I consistently put a space after a comma except if I need one less char to
fit in 80cols. Is this a problem?
For the return to line, I don't really know how to indent the lines. If you
could point me to things not to do, I could correct them.

> Second, why does the qualifier list for
> MakeAddr default to 0?  I can't think of a situation where we'd want
> to set a default for the qualifiers like that.

It was just for testing, and also it mirrored the CreateStore/Load function
which take volatile as an optinal argument. Anyway, corrected.

> 
> Don't worry about aggregates or complex numbers; I'm thinking it's
> likely the aggregate and complex number code will be rewritten to use
> the new first-class structs once they're a bit more stable, which will
> simplify a lot of the "if complex, else if aggregate, else" sorts of
> constructs.

Some complex code already have some kind of handling of volatile. Didn't
change anything. I let the aggregates mostly alone.

-- 
Cédric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: third_try_volatile.patch
Type: application/octet-stream
Size: 24362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080608/f394ed32/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cg_volatile.c
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080608/f394ed32/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cg_volatile.ll
Type: application/octet-stream
Size: 7030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080608/f394ed32/attachment-0001.obj>


More information about the cfe-dev mailing list