the comment to the member var Triple in class TargetOptions suggest that it is ok to leave it default constructed if the target is the host. However this is not the case: passing a default constructed TargetOptions class to TargetInfo::CreateTargetInfo returns a NULL pointer due to a empty Tripel member. This member needs to be initialized (e.g. with llvm::sys::getHostTriple()). So either the comment or TargetInfo::CreateTargetInfo has to be fixed (or TargetOptions needs a ctor).