[PATCH] D51695: [MC] [AsmParser]: Ensure a new CFI frame is not opened within an existing one when using integrated-as.

Kristina Brooks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 11:16:07 PDT 2018


kristina updated this revision to Diff 164085.
kristina added a comment.

Removed extra newline.


Repository:
  rL LLVM

https://reviews.llvm.org/D51695

Files:
  lib/MC/MCParser/AsmParser.cpp


Index: lib/MC/MCParser/AsmParser.cpp
===================================================================
--- lib/MC/MCParser/AsmParser.cpp
+++ lib/MC/MCParser/AsmParser.cpp
@@ -3894,6 +3894,12 @@
         parseToken(AsmToken::EndOfStatement))
       return addErrorSuffix(" in '.cfi_startproc' directive");
   }
+  
+  // TODO(kristina): Deal with PP macro expansion so the error line
+  // matches the source chunk within the diagnostic when in a PP macro.
+  if (getStreamer().hasUnfinishedDwarfFrameInfo())
+    return Error(Lexer.getLoc(),
+                 ".cfi_startproc cannot be used in an existing frame");
 
   getStreamer().EmitCFIStartProc(!Simple.empty());
   return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51695.164085.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180905/e7d09e6f/attachment.bin>


More information about the llvm-commits mailing list