This is to avoid err_target_unknown_abi which is caused by use default TargetTriple instead of shader model target triple.
I don't like using an empty string as a sentinel for an error. Since this is no longer overriding an existing method, we should change it. Probably the easiest change is to llvm::Optional. Then you can return None in the failure cases.
The -T flag is required for DXCMode, so the else of this should emit an error. That also means the code above that explicitly sets the OS to ShaderModel can be removed too.