There is no need to check for deferred diag when device compilation or target is not given. This results in considerable build time improvement in some cases. Differential Revision: https://reviews.llvm.org/D109175