StringRef's data() returns a string that may be non-null-terminated.
Switch to using StringRefs from const char pointers in visitor notes
to avoid problems.
llvm-svn: 337474
// (__attribute__((cleanup))).
// Find out if this is an interesting point and what is the kind.
- const char *Msg = nullptr;
+ StringRef Msg;
StackHintGeneratorForSymbol *StackHint = nullptr;
SmallString<256> Buf;
llvm::raw_svector_ostream OS(Buf);
}
OS << "'";
}
- Msg = OS.str().data();
+ Msg = OS.str();
break;
}
case AF_None:
}
}
- if (!Msg)
+ if (Msg.empty())
return nullptr;
assert(StackHint);