Be more careful in applying pragma weak. Fixes pr14974.

GCC applies a pragma weak to a decl if it matches the mangled name. We used
to apply if it matched the plain name.

This patch is a compromise: we apply the pragma only if it matches the name
and the decl has C language linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176110 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed