This is an archive of the discontinued LLVM Phabricator instance.

Support implicit _Atomic struct load / store
ClosedPublic

Authored by jfb on Jul 17 2018, 4:45 PM.

Details

Summary

Using _Atomic to do implicit load / store is just a seq_cst atomic_load / atomic_store. Stores currently assert in Sema::ImpCastExprToType with 'can't implicitly cast lvalue to rvalue with this cast kind', but that's erroneous. The codegen is fine as the test shows.

While investigating I found that Richard had found the problem here: https://reviews.llvm.org/D46112#1113557

rdar://problem/40347123

Diff Detail

Repository
rL LLVM

Event Timeline

jfb created this revision.Jul 17 2018, 4:45 PM
dexonsmith accepted this revision.Jul 17 2018, 8:28 PM
This revision is now accepted and ready to land.Jul 17 2018, 8:28 PM
jfb added a comment.Jul 18 2018, 11:05 AM

I'm sure there are other bugs around _Atomic, please file a bug an CC me if that's the case. I'll commit this fix for now.

This revision was automatically updated to reflect the committed changes.