[llvm-branch-commits] [llvm-gcc-branch] r75700 - /llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/config/darwin.h
Bill Wendling
isanbard at gmail.com
Tue Jul 14 16:02:54 PDT 2009
Author: void
Date: Tue Jul 14 18:02:53 2009
New Revision: 75700
URL: http://llvm.org/viewvc/llvm-project?rev=75700&view=rev
Log:
--- Merging r73088 into 'gcc/config/darwin.h':
U gcc/config/darwin.h
Weak imports on Darwin do not apply to data definitions.
Modified:
llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/config/darwin.h
Modified: llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/config/darwin.h?rev=75700&r1=75699&r2=75700&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/branches/Apple/Bender-SWB/gcc/config/darwin.h Tue Jul 14 18:02:53 2009
@@ -662,18 +662,19 @@
/* As in the warning above, alias definitions aren't supported on Mach-O. */
#define TARGET_DOES_NOT_SUPPORT_ALIAS_DEFINITIONS
-/* weak_import, a Darwin special, does not make function definitions weak. */
+/* weak_import, a Darwin special, does not make definitions weak. */
#define TARGET_ADJUST_LLVM_LINKAGE(FN, DECL) \
do { \
if ((DECL) && \
- TREE_CODE (DECL) == FUNCTION_DECL && \
- !DECL_EXTERNAL (DECL) && \
+ (TREE_CODE (DECL) != FUNCTION_DECL || !DECL_EXTERNAL (DECL)) && \
TREE_PUBLIC (DECL) && \
DECL_WEAK (DECL) && \
! lookup_attribute ("weak", DECL_ATTRIBUTES (DECL)) && \
lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL)) && \
(FN)->hasWeakLinkage()) { \
- (FN)->setLinkage(Function::ExternalLinkage); \
+ (FN)->setLinkage(TREE_CODE(DECL)==FUNCTION_DECL ? \
+ Function::ExternalLinkage : \
+ GlobalValue::ExternalLinkage); \
} \
} while (0)
More information about the llvm-branch-commits
mailing list