Skip to content
Snippets Groups Projects
  1. Apr 12, 2012
  2. Mar 11, 2012
  3. Mar 07, 2012
  4. Feb 20, 2012
  5. Feb 07, 2012
  6. Feb 05, 2012
  7. Jan 27, 2012
  8. Jan 26, 2012
    • Douglas Gregor's avatar
      Extend the ExternalASTSource interface to allow the AST source to · 453dbcbe
      Douglas Gregor authored
      provide the layout of records, rather than letting Clang compute
      the layout itself. LLDB provides the motivation for this feature:
      because various layout-altering attributes (packed, aligned, etc.)
      don't get reliably get placed into DWARF, the record layouts computed
      by LLDB from the reconstructed records differ from the actual layouts,
      and badness occurs. This interface lets the DWARF data drive layout,
      so we don't need the attributes preserved to get the answer write.
      
      The testing methodology for this change is fun. I've introduced a
      variant of -fdump-record-layouts called -fdump-record-layouts-simple
      that always has the simple C format and provides size/alignment/field
      offsets. There is also a -cc1 option -foverride-record-layout=<file>
      to take the output of -fdump-record-layouts-simple and parse it to
      produce a set of overridden layouts, which is introduced into the AST
      via a testing-only ExternalASTSource (called
      LayoutOverrideSource). Each test contains a number of records to lay
      out, which use various layout-changing attributes, and then dumps the
      layouts. We then run the test again, using the preprocessor to
      eliminate the layout-changing attributes entirely (which would give us
      different layouts for the records), but supplying the
      previously-computed record layouts. Finally, we diff the layouts
      produced from the two runs to be sure that they are identical.
      
      Note that this code makes the assumption that we don't *have* to
      provide the offsets of bases or virtual bases to get the layout right,
      because the alignment attributes don't affect it. I believe this
      assumption holds, but if it does not, we can extend
      LayoutOverrideSource to also provide base offset information.
      
      Fixes the Clang side of <rdar://problem/10169539>.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149055 91177308-0d34-0410-b5e6-96231b3b80d8
      453dbcbe
  9. Jan 20, 2012
  10. Jan 05, 2012
  11. Dec 20, 2011
  12. Dec 09, 2011
  13. Oct 29, 2011
  14. Sep 26, 2011
  15. Sep 15, 2011
  16. Aug 26, 2011
  17. Aug 06, 2011
  18. Jul 23, 2011
  19. Jul 19, 2011
    • Douglas Gregor's avatar
      Revamp the SourceManager to separate the representation of parsed · f62d43d2
      Douglas Gregor authored
      source locations from source locations loaded from an AST/PCH file.
      
      Previously, loading an AST/PCH file involved carefully pre-allocating
      space at the beginning of the source manager for the source locations
      and FileIDs that correspond to the prefix, and then appending the
      source locations/FileIDs used for parsing the remaining translation
      unit. This design forced us into loading PCH files early, as a prefix,
      whic has become a rather significant limitation.
      
      This patch splits the SourceManager space into two parts: for source
      location "addresses", the lower values (growing upward) are used to
      describe parsed code, while upper values (growing downward) are used
      for source locations loaded from AST/PCH files. Similarly, positive
      FileIDs are used to describe parsed code while negative FileIDs are
      used to file/macro locations loaded from AST/PCH files. As a result,
      we can load PCH/AST files even during parsing, making various
      improvemnts in the future possible, e.g., teaching #include <foo.h> to
      look for and load <foo.h.gch> if it happens to be already available.
      
      This patch was originally written by Sebastian Redl, then brought
      forward to the modern age by Jonathan Turner, and finally
      polished/finished by me to be committed.
      
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135484 91177308-0d34-0410-b5e6-96231b3b80d8
      f62d43d2
  20. Jun 18, 2011
  21. Jun 16, 2011
    • Chandler Carruth's avatar
      Raise the ARCMT functionality in Clang into proper FrontendActions. · f7f8188f
      Chandler Carruth authored
      These are somewhat special in that they wrap any other FrontendAction,
      running various ARC transformations or checks prior to the standard
      action's run. To implement them easily, this extends FrontendAction to
      have a WrapperFrontendAction utility class which forwards all calls by
      default to an inner action setup at construction time. This is then
      subclassed to override the specific behavior needed by the different
      ARCMT tools.
      
      Finally, FrontendTool is taught how to create these wrapper actions from
      the existing flags and options structures.
      
      The result is that clangFrontend no longer depends on clangARCMigrate.
      This is very important, as clangARCMigrate *heavily* depends on
      clangFrontend. Fundamentally ARCMigrate is at the same layer as
      a library like Rewrite, sitting firmly on top of the Frontend, but tied
      together with the FrontendTool when building the clang binary itself.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133161 91177308-0d34-0410-b5e6-96231b3b80d8
      f7f8188f
  22. Mar 21, 2011
  23. Mar 09, 2011
  24. Feb 09, 2011
  25. Feb 05, 2011
    • Douglas Gregor's avatar
      Improve our uniquing of file entries when files are re-saved or are · 8ef6c8cb
      Douglas Gregor authored
      overridden via remapping. Thus, when we create a "virtual" file in the
      file manager, we still stat() the real file that lives behind it so
      that we can provide proper uniquing based on inodes. This helps keep
      the file manager much more consistent.
      
      To take advantage of this when reparsing files in libclang, we disable
      the use of the stat() cache when reparsing or performing code
      completion, since the stat() cache is very likely to be out of date in
      this use case.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124971 91177308-0d34-0410-b5e6-96231b3b80d8
      8ef6c8cb
  26. Jan 29, 2011
  27. Jan 25, 2011
  28. Nov 30, 2010
  29. Nov 23, 2010
  30. Nov 18, 2010
  31. Nov 03, 2010
    • Argyrios Kyrtzidis's avatar
      Implement -working-directory. · 389db16c
      Argyrios Kyrtzidis authored
      When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
      This helps both when using libclang (where we can't require the user to actually change the working directory)
      and to help reproduce test cases when the reproduction work comes along.
      
      --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
       the working directory value if set).
      --FileSystemOptions are passed around to various interfaces that perform file operations.
      --Opening & reading the content of files should be done only through FileManager. This is useful in general since
       file operations will be abstracted in the future for the reproduction mechanism.
      
      FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
      FileManager but with different FileSystemOptions.
      
      Addresses rdar://8583824.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
      389db16c
  32. Oct 29, 2010
  33. Oct 24, 2010
  34. Oct 14, 2010
  35. Aug 20, 2010
  36. Aug 19, 2010
  37. Aug 13, 2010
Loading