Skip to content
  1. Apr 15, 2011
  2. Apr 09, 2011
  3. Mar 09, 2011
  4. Mar 05, 2011
  5. Feb 23, 2011
  6. Feb 16, 2011
  7. Feb 11, 2011
  8. Feb 03, 2011
    • Douglas Gregor's avatar
      Teach SourceManager::getLocation() how to cope with a source file · e664276b
      Douglas Gregor authored
      whose inode has changed since the file was first created and that is
      being seen through a different path name (e.g., due to symlinks or
      relative path elements), such that its FileEntry pointer doesn't match
      a known FileEntry pointer. Since this requires a system call (to
      stat()), we only perform this deeper checking if we can't find the
      file by comparing FileEntry pointers.
      
      Also, add a micro-optimization where we don't bother to compute line
      numbers when given the location (1, 1). This improves the
      efficiency of clang_getLocationForOffset().
       
      
      llvm-svn: 124800
      e664276b
  9. Jan 31, 2011
  10. Dec 24, 2010
  11. Nov 29, 2010
  12. Nov 23, 2010
    • Chris Lattner's avatar
      reduce indentation and use early outs, to make it easier to read · 5631b052
      Chris Lattner authored
      this code. no functionality change.
      
      llvm-svn: 120011
      5631b052
    • Chris Lattner's avatar
      now the FileManager has a FileSystemOpts ivar, stop threading · 5159f616
      Chris Lattner authored
      FileSystemOpts through a ton of apis, simplifying a lot of code.
      This also fixes a latent bug in ASTUnit where it would invoke
      methods on FileManager without creating one in some code paths
      in cindextext.
      
      llvm-svn: 120010
      5159f616
    • Chris Lattner's avatar
      Partially revert Doug's PCH validation patch (r98585). · 4ac569b2
      Chris Lattner authored
      This patch completely defeated the "passing in a prestat'd size 
      to MemoryBuffer" optimization, leading to an extra fstat call for
      every buffer opened, in order to find out if the datestamp and size 
      of the file on disk matches what is in the stat cache.
      
      I fully admit that I don't completely understand what is going on here:
      why punish code when a stat cache isn't in use?  what is the point of a
      stat cache if you have to turn around and stat stuff to validate it?
      
      To resolve both these issues, just drop the modtime check and check the
      file size, which is the important thing anyway.  This should also resolve
      PR6812, because presumably windows is stable when it comes to file sizes.
      If the modtime is actually important, we should get it and keep it on the
      first stat.
      
      This eliminates 833 fstat syscalls when processing Cocoa.h, speeding up
      system time on -Eonly Cocoa.h  from 0.041 to 0.038s.
      
      llvm-svn: 120001
      4ac569b2
  13. Nov 18, 2010
    • Argyrios Kyrtzidis's avatar
      Refactoring of Diagnostic class. · d0040648
      Argyrios Kyrtzidis authored
      -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
      -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
      -The rest of the state in Diagnostic object is considered related and tied to one translation unit.
      -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
         SourceLocation instead of a FullSourceLoc.
      -Reflect the changes to various interfaces.
      
      llvm-svn: 119730
      d0040648
    • Benjamin Kramer's avatar
      5a3f1cfa
  14. Nov 03, 2010
    • Argyrios Kyrtzidis's avatar
      Implement -working-directory. · 71731d6b
      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.
      
      llvm-svn: 118203
      71731d6b
  15. Nov 02, 2010
  16. Oct 26, 2010
  17. Oct 23, 2010
  18. Oct 05, 2010
  19. Aug 26, 2010
  20. Aug 19, 2010
  21. Jul 28, 2010
  22. Jul 26, 2010
    • Douglas Gregor's avatar
      Introduce basic support for loading a precompiled preamble while · 3f4bea06
      Douglas Gregor authored
      reparsing an ASTUnit. When saving a preamble, create a buffer larger
      than the actual file we're working with but fill everything from the
      end of the preamble to the end of the file with spaces (so the lexer
      will quickly skip them). When we load the file, create a buffer of the
      same size, filling it with the file and then spaces. Then, instruct
      the lexer to start lexing after the preamble, therefore continuing the
      parse from the spot where the preamble left off.
      
      It's now possible to perform a simple preamble build + parse (+
      reparse) with ASTUnit. However, one has to disable a bunch of checking
      in the PCH reader to do so. That part isn't committed; it will likely
      be handled with some other kind of flag (e.g., -fno-validate-pch).
      
      As part of this, fix some issues with null termination of the memory
      buffers created for the preamble; we were trying to explicitly
      NULL-terminate them, even though they were also getting implicitly
      NULL terminated, leading to excess warnings about NULL characters in
      source files.
      
      llvm-svn: 109445
      3f4bea06
  23. May 07, 2010
  24. May 06, 2010
  25. Apr 20, 2010
  26. Apr 10, 2010
  27. Apr 09, 2010
  28. Mar 22, 2010
    • Douglas Gregor's avatar
      Introduce the notion of a single "delayed" diagnostic into the · 85795316
      Douglas Gregor authored
      Diagnostic subsystem, which is used in the rare case where we find a
      serious problem (i.e., an inconsistency in the file system) while
      we're busy formatting another diagnostic. In this case, the delayed
      diagnostic will be emitted after we're done with the other
      diagnostic. This is only to be used for fatal conditions detected at
      very inconvenient times, where we can neither stop the current
      diagnostic in flight nor can we suppress the second error.
      
      llvm-svn: 99175
      85795316
  29. Mar 21, 2010
  30. Mar 19, 2010
    • Douglas Gregor's avatar
      Fix a longstanding (but previously unknown) bug in the lazy · 51c2351d
      Douglas Gregor authored
      deserialization of precompiled headers, where the deserialization of
      the source location entry for a buffer (e.g., macro instantiation
      scratch space) would overwrite a one-element FileID cache in the
      source manager. When tickled at the wrong time, we would return the
      wrong decomposed source location and eventually cause c-index-test to
      crash.
      
      Found by dumb luck. It's amazing this hasn't shown up before.
      
      llvm-svn: 98940
      51c2351d
  31. Mar 17, 2010
Loading