diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:07:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:07:01 +0000 |
commit | d9951203f064e2115ec83b304d478da041a078ef (patch) | |
tree | 5c659e2b81e319bdc411bb8447a4a33b74f339bd /llvm/lib/Target/DarwinTargetAsmInfo.cpp | |
parent | e45ff5cc2bef42994ac0d5955b5d6267639e8d9d (diff) | |
download | bcm5719-llvm-d9951203f064e2115ec83b304d478da041a078ef.tar.gz bcm5719-llvm-d9951203f064e2115ec83b304d478da041a078ef.zip |
simplify this code now that SectionKind knows if a global is weak or not.
llvm-svn: 77141
Diffstat (limited to 'llvm/lib/Target/DarwinTargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/DarwinTargetAsmInfo.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp index 503df19a3ff..845da666806 100644 --- a/llvm/lib/Target/DarwinTargetAsmInfo.cpp +++ b/llvm/lib/Target/DarwinTargetAsmInfo.cpp @@ -129,15 +129,12 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, 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; |