Skip to content
Snippets Groups Projects
  1. May 02, 2014
  2. Mar 15, 2014
  3. Mar 07, 2014
  4. Feb 24, 2014
  5. Feb 17, 2014
  6. Feb 13, 2014
  7. Jan 31, 2014
  8. Jan 07, 2014
  9. Nov 23, 2013
  10. Nov 07, 2013
  11. Sep 19, 2013
    • Eli Friedman's avatar
      Make Preprocessor::Lex non-recursive. · d2f93082
      Eli Friedman authored
      Before this patch, Lex() would recurse whenever the current lexer changed (e.g.
      upon entry into a macro). This patch turns the recursion into a loop: the
      various lex routines now don't return a token when the current lexer changes,
      and at the top level Preprocessor::Lex() now loops until it finds a token.
      Normally, the recursion wouldn't end up being very deep, but the recursion depth
      can explode in edge cases like a bunch of consecutive macros which expand to
      nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this
      patch).
      
      <rdar://problem/14569770>
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190980 91177308-0d34-0410-b5e6-96231b3b80d8
      d2f93082
  12. Aug 05, 2013
  13. May 04, 2013
  14. Apr 30, 2013
  15. Mar 27, 2013
  16. Mar 26, 2013
    • Argyrios Kyrtzidis's avatar
      [Preprocessor/Modules] Separate the macro directives kinds into their own... · c56fff7f
      Argyrios Kyrtzidis authored
      [Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses.
      
      For each macro directive (define, undefine, visibility) have a separate object that gets chained
      to the macro directive history. This has several benefits:
      
      -No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
       PPMutationListener become unnecessary.
      -No need to keep extra source locations for the undef/visibility locations for the define directive object
       (which is the majority of the directives)
      -Much easier to hide/unhide a section in the macro directive history.
      -Easier to track the effects of the directives across different submodules.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
      c56fff7f
  17. Feb 24, 2013
  18. Feb 20, 2013
    • Argyrios Kyrtzidis's avatar
      [preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class · 9818a1d4
      Argyrios Kyrtzidis authored
      for the data specific to a macro definition (e.g. what the tokens are), and
      MacroDirective class which encapsulates the changes to the "macro namespace"
      (e.g. the location where the macro name became active, the location where it was undefined, etc.)
      
      (A MacroDirective always points to a MacroInfo object.)
      
      Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but
      splitting the concepts allows us to better model the effect of modules to the macro namespace
      (also as a bonus it allows better modeling of push_macro/pop_macro #pragmas).
      Modules can have their own macro history, separate from the local (current translation unit)
      macro history; MacroDirectives will be used to model the macro history (changes to macro namespace).
      
      For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created
      to indicate that "FOO" became active at the import location. Module "A" itself will contain another
      MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives
      will point to the same MacroInfo object.
      
      Introducing the separation of macro concepts is the first part towards better modeling of module macros.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
      9818a1d4
  19. Feb 01, 2013
  20. Jan 31, 2013
  21. Jan 30, 2013
  22. Jan 24, 2013
    • Jordan Rose's avatar
      Handle universal character names and Unicode characters outside of literals. · c7629d94
      Jordan Rose authored
      This is a missing piece for C99 conformance.
      
      This patch handles UCNs by adding a '\\' case to LexTokenInternal and
      LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN.
      If the UCN is not syntactically well-formed, we fall back to the old
      treatment: a backslash followed by an identifier beginning with 'u' (or 'U').
      
      Because the spelling of an identifier with UCNs still has the UCN in it, we
      need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo.
      
      Of course, valid code that does *not* use UCNs will see only a very minimal
      performance hit (checks after each identifier for non-ASCII characters,
      checks when converting raw_identifiers to identifiers that they do not
      contain UCNs, and checks when getting the spelling of an identifier that it
      does not contain a UCN).
      
      This patch also adds basic support for actual UTF-8 in the source. This is
      treated almost exactly the same as UCNs except that we consider stray
      Unicode characters to be mistakes and offer a fixit to remove them.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173369 91177308-0d34-0410-b5e6-96231b3b80d8
      c7629d94
  23. Jan 17, 2013
  24. Jan 16, 2013
  25. Jan 12, 2013
  26. Dec 12, 2012
  27. Dec 11, 2012
  28. Dec 04, 2012
  29. Nov 17, 2012
  30. Oct 24, 2012
  31. Oct 10, 2012
    • Douglas Gregor's avatar
      Rework the (de-)serialization of macros, as stored in · a8235d6c
      Douglas Gregor authored
      MacroInfo*. Instead of simply dumping an offset into the current file,
      give each macro definition a proper ID with all of the standard
      modules-remapping facilities. Additionally, when a macro is modified
      in a subsequent AST file (e.g., #undef'ing a macro loaded from another
      module or from a precompiled header), provide a macro update record
      rather than rewriting the entire macro definition. This gives us
      greater consistency with the way we handle declarations, and ties
      together macro definitions much more cleanly.
      
      Note that we're still not actually deserializing macro history (we
      never were), but it's far easy to do properly now.
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165560 91177308-0d34-0410-b5e6-96231b3b80d8
      a8235d6c
  32. Sep 29, 2012
  33. Sep 24, 2012
Loading