return false;
}
-static unsigned SectionFlagsForGlobal(const GlobalValue *GV,
- SectionKind Kind) {
+static unsigned SectionFlagsForGlobal(SectionKind Kind) {
// Decode flags from global and section kind.
unsigned Flags = SectionFlags::None;
- if (GV->isWeakForLinker())
+ if (Kind.isWeak())
Flags |= SectionFlags::Linkonce;
if (Kind.isBSS() || Kind.isThreadBSS())
Flags |= SectionFlags::BSS;
return TS;
// Honour section already set, if any.
- unsigned Flags = SectionFlagsForGlobal(GV, Kind);
+ unsigned Flags = SectionFlagsForGlobal(Kind);
// This is an explicitly named section.
Flags |= SectionFlags::Named;
// If this global is linkonce/weak and the target handles this by emitting it
// into a 'uniqued' section name, create and return the section now.
- if (GV->isWeakForLinker()) {
+ if (Kind.isWeak()) {
if (const char *Prefix = getSectionPrefixForUniqueGlobal(Kind)) {
- unsigned Flags = SectionFlagsForGlobal(GV, Kind);
+ unsigned Flags = SectionFlagsForGlobal(Kind);
// FIXME: Use mangler interface (PR4584).
std::string Name = Prefix+GV->getNameStr();