Robustify the @encode code and add support for _Atomic.

Fixes PR14628.

llvm-svn: 170639
2 files changed