Return a StringRef from getSection.

This is similar to how getName is handled.

llvm-svn: 269218
This commit is contained in:
Rafael Espindola
2016-05-11 18:21:59 +00:00
parent 3f61c1ab5e
commit 83658d6e7a
10 changed files with 20 additions and 19 deletions

View File

@@ -248,7 +248,7 @@ uint32_t IRObjectFile::getSymbolFlags(DataRefImpl Symb) const {
if (GV->getName().startswith("llvm."))
Res |= BasicSymbolRef::SF_FormatSpecific;
else if (auto *Var = dyn_cast<GlobalVariable>(GV)) {
if (Var->getSection() == StringRef("llvm.metadata"))
if (Var->getSection() == "llvm.metadata")
Res |= BasicSymbolRef::SF_FormatSpecific;
}