"llvm/lib/git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "b5874dea6e5d48a6dd4c88c795ba9febf8a3be5e"
Newer
Older
static const char *getCOFFSectionPrefixForUniqueGlobal(SectionKind Kind) {
if (Kind.isText())
return ".text$linkonce";
if (Kind.isWriteable())
return ".data$linkonce";
return ".rdata$linkonce";
}
const MCSection *TargetLoweringObjectFileCOFF::
Chris Lattner
committed
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Mangler *Mang, const TargetMachine &TM) const {
Chris Lattner
committed
assert(!Kind.isThreadLocal() && "Doesn't support TLS");
// 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.
Chris Lattner
committed
const char *Prefix = getCOFFSectionPrefixForUniqueGlobal(Kind);
std::string Name = Mang->makeNameProper(GV->getNameStr());
return getCOFFSection((Prefix+Name).c_str(), false, Kind);
}
Chris Lattner
committed
if (Kind.isText())
return getTextSection();
return getDataSection();
}