[llvm-commits] [llvm-gcc-4.2] r102963 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Mon May 3 14:50:55 PDT 2010
Author: void
Date: Mon May 3 16:50:55 2010
New Revision: 102963
URL: http://llvm.org/viewvc/llvm-project?rev=102963&view=rev
Log:
Revert r102947.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=102963&r1=102962&r2=102963&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Mon May 3 16:50:55 2010
@@ -1379,12 +1379,8 @@
} else if (!TREE_PUBLIC(decl)) {
Linkage = GlobalValue::InternalLinkage;
} else if (DECL_WEAK(decl)) {
- if (DECL_ONE_ONLY(decl) &&
- !lookup_attribute("weak", DECL_ATTRIBUTES(decl)))
- Linkage = GlobalValue::getWeakLinkage(flag_odr);
- else
- // The user may have explicitly asked for weak linkage - ignore flag_odr.
- Linkage = GlobalValue::WeakAnyLinkage;
+ // The user may have explicitly asked for weak linkage - ignore flag_odr.
+ Linkage = GlobalValue::WeakAnyLinkage;
} else if (DECL_ONE_ONLY(decl)) {
Linkage = GlobalValue::getWeakLinkage(flag_odr);
} else if (DECL_COMMON(decl) && // DECL_COMMON is only meaningful if no init
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=102963&r1=102962&r2=102963&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon May 3 16:50:55 2010
@@ -545,12 +545,8 @@
} else if (DECL_COMDAT(FnDecl)) {
Fn->setLinkage(Function::getLinkOnceLinkage(flag_odr));
} else if (DECL_WEAK(FnDecl)) {
- if (DECL_ONE_ONLY(FnDecl) &&
- !lookup_attribute("weak", DECL_ATTRIBUTES(FnDecl)))
- Fn->setLinkage(Function::getWeakLinkage(flag_odr));
- else
- // The user may have explicitly asked for weak linkage - ignore flag_odr.
- Fn->setLinkage(Function::WeakAnyLinkage);
+ // The user may have explicitly asked for weak linkage - ignore flag_odr.
+ Fn->setLinkage(Function::WeakAnyLinkage);
} else if (DECL_ONE_ONLY(FnDecl)) {
Fn->setLinkage(Function::getWeakLinkage(flag_odr));
}
More information about the llvm-commits
mailing list