[PATCH] Implementation of #pragma (data|code|const|bss)_seg

Warren Hunt whunt at google.com
Wed Mar 12 18:07:07 PDT 2014


Hi rsmith, majnemer, rnk,

This patch implements the microsoft segment pragmas.  As posted it works up to testing but it needs a little polish and some lit tests.  Particularly I'm pretty sure that the way I assign the code_seg attribute in CheckFunctionDeclaration is wrong.  Another thing to note about this patch is that it introduces a unified pragma lexer for microsoft pragmas.  This lexer basically just snarfs up some tokens, adds a marker token and passes them all onto the parser, which actually parses the tokens.  The idea is that all past and future ms pragmas would migrate to this pattern.

http://llvm-reviews.chandlerc.com/D3065

Files:
  include/clang/Basic/Attr.td
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Basic/TokenKinds.def
  include/clang/Parse/Parser.h
  include/clang/Sema/Sema.h
  lib/CodeGen/CodeGenModule.cpp
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParsePragma.cpp
  lib/Parse/ParseStmt.cpp
  lib/Parse/Parser.cpp
  lib/Sema/Sema.cpp
  lib/Sema/SemaAttr.cpp
  lib/Sema/SemaDecl.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3065.1.patch
Type: text/x-patch
Size: 19528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140312/389883bd/attachment.bin>


More information about the cfe-commits mailing list