Currently ppc::getPPCTargetCPU returns an empty string when it encounters an unknown value passed to -mcpu. This causes clang to ignore unknown -mcpu values silently.
This patch changes the behaviour of ppc::getPPCTargetCPU so that it passes the unknown option to the target info, so the target info can actually check if the CPU string is supported, and report an error when encountering unknown/unsupported CPU string.
This seems strange. If the option is "generic", it calls getPPCGenericTargetCPU(), but if it is "common", it returns "generic." I think you may want to also call getPPCGenericTargetCPU() here. There should probably also be an assume where this returns that it didn't return "generic" if that is the intended result. Also, there should also be tests for what happens when "generic" and "common" are specified.