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

@@ -1242,7 +1242,7 @@ bool AddressSanitizerModule::ShouldInstrumentGlobal(GlobalVariable *G) {
if (G->getAlignment() > MinRedzoneSizeForGlobal()) return false;
if (G->hasSection()) {
StringRef Section(G->getSection());
StringRef Section = G->getSection();
// Globals from llvm.metadata aren't emitted, do not instrument them.
if (Section == "llvm.metadata") return false;