[mips] Fix a typo in the compare patterns for MIPS32r6/MIPS64r6.
[oota-llvm.git] / lib / MC / MCObjectStreamer.cpp
index 17371a285089f578ee7c484d1f64d9d838e673ce..08fe5017bd50d95b79bb05972958959c825aba38 100644 (file)
@@ -128,13 +128,10 @@ void MCObjectStreamer::EmitValueImpl(const MCExpr *Value, unsigned Size,
   DF->getContents().resize(DF->getContents().size() + Size, 0);
 }
 
-void MCObjectStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame,
-                                            MCSymbol *FuncSym) {
-  if (!FuncSym) {
-    FuncSym = getContext().CreateTempSymbol();
-    EmitLabel(FuncSym);
-  }
-  Frame.Begin = FuncSym;
+void MCObjectStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) {
+  // We need to create a local symbol to avoid relocations.
+  Frame.Begin = getContext().CreateTempSymbol();
+  EmitLabel(Frame.Begin);
 }
 
 void MCObjectStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
@@ -408,7 +405,9 @@ void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
 }
 
 void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
-  unsigned ItemSize = getCurrentSection().first->isVirtualSection() ? 0 : 1;
+  const MCSection *Sec = getCurrentSection().first;
+  assert(Sec && "need a section");
+  unsigned ItemSize = Sec->isVirtualSection() ? 0 : 1;
   insert(new MCFillFragment(0, ItemSize, NumBytes));
 }