Yes, that's a fine way to do it. It would be a little cleaner to pull out a function to do the entire -> i32 conversion, so that you can just have Args.push_back(getAsInt32(CGF, C)); Otherwise LGTM. http://reviews.llvm.org/D10838