AsmPrinter: Convert DIE::Values to a linked list
[oota-llvm.git] / lib / CodeGen / AsmPrinter / ErlangGCPrinter.cpp
index aa4418f6a754949b83aa2ce2acd40c0b8bfb84cf..eb9e4c10daf45cbd201e3cfd6d3499ec8c22d88d 100644 (file)
@@ -47,14 +47,13 @@ void llvm::linkErlangGCPrinter() {}
 
 void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
                                      AsmPrinter &AP) {
-  MCStreamer &OS = AP.OutStreamer;
-  unsigned IntPtrSize =
-      AP.TM.getSubtargetImpl()->getDataLayout()->getPointerSize();
+  MCStreamer &OS = *AP.OutStreamer;
+  unsigned IntPtrSize = AP.TM.getDataLayout()->getPointerSize();
 
   // Put this in a custom .note section.
-  AP.OutStreamer.SwitchSection(
-      AP.getObjFileLowering().getContext().getELFSection(
-          ".note.gc", ELF::SHT_PROGBITS, 0, SectionKind::getDataRel()));
+  OS.SwitchSection(
+      AP.getObjFileLowering().getContext().getELFSection(".note.gc",
+                                                         ELF::SHT_PROGBITS, 0));
 
   // For each function...
   for (GCModuleInfo::FuncInfoVec::iterator FI = Info.funcinfo_begin(),