Return a StringRef from getSection.

This is similar to how getName is handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269218 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2016-05-11 18:21:59 +00:00
parent 6c85d0113d
commit e973d3f2ce
10 changed files with 20 additions and 19 deletions
+1 -1
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;
}