Add sanitizer attributes.

If the sanitizer is enabled (e.g. -sanitize=address) then the corresponding
attribute (e.g. llvm::Attribute::SanitizerAddress) must be set.