To compile hip code, the clang++ is invoked with -x hip, so we should derive the language from the -x flag.