This patch makes the following changes to CodeGenModule::CreateGlobalInitOrDestructFunction:
- Use SetInternalFunctionAttributes instead of SetLLVMFunctionAttributes. Some of the attributes (e.g., stack protector strong) are added in SetLLVMFunctionAttributesForDefinition, which gets called from SetInternalFunctionAttributes.
- Pass the correct CGFunctionInfo to SetInternalFunctionAttributes instead of always passing what arrangeNullaryFunction returns. arrangeNullaryFunction returns the CGFunctionInfo for functions of type void(), but some of the functions are of different types. I haven't found a case where clang mis-compiles because of this bug, but nevertheless I think we should pass the correct type here.