[llvm-commits] [llvm] r77141 - /llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Sun Jul 26 00:09:23 PDT 2009
Author: lattner
Date: Sun Jul 26 02:07:01 2009
New Revision: 77141
URL: http://llvm.org/viewvc/llvm-project?rev=77141&view=rev
Log:
simplify this code now that SectionKind knows if a global is weak or not.
Modified:
llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=77141&r1=77140&r2=77141&view=diff
==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Sun Jul 26 02:07:01 2009
@@ -129,15 +129,12 @@
SectionKind Kind) const {
assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS");
- // FIXME: Use sectionflags:linkonce instead of isWeakForLinker() here.
- bool isWeak = GV->isWeakForLinker();
-
if (Kind.isText())
- return isWeak ? TextCoalSection : TextSection;
+ return Kind.isWeak() ? TextCoalSection : TextSection;
// If this is weak/linkonce, put this in a coalescable section, either in text
// or data depending on if it is writable.
- if (isWeak) {
+ if (Kind.isWeak()) {
if (Kind.isReadOnly())
return ConstTextCoalSection;
return DataCoalSection;
More information about the llvm-commits
mailing list