MCStreamer::MCStreamer(MCContext &Ctx) : Context(Ctx), EmitEHFrame(true),
EmitDebugFrame(false),
- CurrentW64UnwindInfo(0) {
+ CurrentW64UnwindInfo(0),
+ LastSymbol(0) {
const MCSection *section = NULL;
SectionStack.push_back(std::make_pair(section, section));
}
MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
if (CurFrame && !CurFrame->End)
report_fatal_error("Starting a frame before finishing the previous one!");
- MCDwarfFrameInfo Frame;
+ MCDwarfFrameInfo Frame;
Frame.Function = LastSymbol;
// If the function is externally visible, we need to create a local
// symbol to avoid relocations.
StringRef Prefix = getContext().getAsmInfo().getPrivateGlobalPrefix();
- if (LastSymbol->getName().startswith(Prefix)) {
+ if (LastSymbol && LastSymbol->getName().startswith(Prefix)) {
Frame.Begin = LastSymbol;
} else {
Frame.Begin = getContext().CreateTempSymbol();