Add support for subsections to the ELF assembler. Fixes PR8717.
[oota-llvm.git] / lib / MC / MCParser / DarwinAsmParser.cpp
index 6d6409fb69e229ffe3ab1e0345c9e409a9a3791d..7eb8b748348e8c369d2fa528d1c32809d92b67b3 100644 (file)
@@ -566,10 +566,10 @@ bool DarwinAsmParser::ParseDirectivePopSection(StringRef, SMLoc) {
 /// ParseDirectivePrevious:
 ///   ::= .previous
 bool DarwinAsmParser::ParseDirectivePrevious(StringRef DirName, SMLoc) {
-  const MCSection *PreviousSection = getStreamer().getPreviousSection();
-  if (PreviousSection == NULL)
+  MCSectionSubPair PreviousSection = getStreamer().getPreviousSection();
+  if (PreviousSection.first == NULL)
       return TokError(".previous without corresponding .section");
-  getStreamer().SwitchSection(PreviousSection);
+  getStreamer().SwitchSection(PreviousSection.first, PreviousSection.second);
   return false;
 }