This patch adds support for the long_call, far, and near attributes for MIPS targets. The long_call and far attributes are synonyms. All these attributes override -mlong-calls / -mno-long-calls command line options for particular function.
The main non-trivial part is the change in CodeGenModule::ConstructAttributeList routine. It is not enough to configure attributes in MIPSTargetCodeGenInfo::setTargetAttributes because this method applied to the function definitions only while we need to configure the attributes for function declarations as well.
Related backend patch is D35480.