Fix LLVM function attributes

As it turns out, I converted function attributes to the wrong API.  Use
Function::addAttribute().

Fixes segmentation fault in libcpu tests.

Signed-off-by: Pekka Enberg <penberg@iki.fi>