Splitting the different logic is cleaner and we it will be easier to implement the enum emitting (which otherwise would have to reimplement the Record parsing). llvm-svn: 367207