Factored this code into a .c file for clang.
Authored by: tswift 2013-10-27
Parent: [r7820]
Child: [r7822]