1. Nov 13, 2019
    • Krzysztof Parzyszek's avatar
    • Adrian Prantl's avatar
      Performance: Add a set of visited SymbolFiles to the other FindFiles variant. · 3b73dcdc
      Adrian Prantl authored
      This is basically the same bug as in r260434.
      
      SymbolFileDWARF::FindTypes has exponential worst-case when digging
      through dependency DAG of .pcm files because each object file and .pcm
      file may depend on an already-visited .pcm file, which may again have
      dependencies. Fixed here by carrying a set of already visited
      SymbolFiles around.
      
      rdar://problem/56993424
      
      Differential Revision: https://reviews.llvm.org/D70106
      3b73dcdc
    • Julian Lettner's avatar
      [lit] Better/earlier errors for empty runs · 54a9b4c0
      Julian Lettner authored
      Fail early, when we discover no tests at all, or filter out all of them.
      
      There is also `--allow-empty-runs` to disable test to allow workflows
      like `LIT_FILTER=abc ninja check-all`.  Apparently `check-all` invokes
      lit multiple times if certain projects are enabled, which would produce
      unwanted "empty runs". Specify via `LIT_OPTS=--allow-empty-runs`.
      
      There are 3 causes for empty runs:
      1) No tests discovered.  This is always an error.  Fix test suite config
         or command line.
      2) All tests filtered out.  This is an error by default, but can be
         suppressed via `--alow-empty-runs`.  Should prevent accidentally
         passing empty runs, but allow the workflow above.
      3) The number of shards is greater than the number of tests.  Currently,
         this is never an error.  Personally, I think we should consider
         making this an error by default; if this happens, you are doing
         something wrong. I added a warning but did not change the behavior,
         since this warrants more discussion.
      
      Reviewed By: atrick, jdenny
      
      Differential Revision: https://reviews.llvm.org/D70105
      54a9b4c0
    • Duncan P. N. Exon Smith's avatar
      clang/Modules: Error if ReadASTBlock does not find the main module · 83dcb34b
      Duncan P. N. Exon Smith authored
      If ReadASTBlock does not find its top-level submodule, there's something
      wrong the with the PCM.  Error in that case, to avoid hitting problems
      further from the source.
      
      Note that the Swift compiler sometimes hits a case in
      CompilerInstance::loadModule where the top-level submodule mysteriously
      does not have Module::IsFromModuleFile set.  That will emit a confusing
      warn_missing_submodule, which was never intended for the main module.
      The recent audit of error-handling in ReadAST may have rooted out the
      real problem.  If not, this commit will help to clarify the real
      problem, and replace a confusing warning with an error pointing at the
      malformed PCM file.
      
      We're specifically sniffing out whether the top-level submodule was
      found/processed, in case there is a malformed module file that is
      missing it.  If there is an error encountered during ReadSubmoduleBlock
      the return status should already propagate through.  It would be nice to
      detect other missing submodules around here to catch other instances of
      warn_missing_submodule closer to the source, but that's left as a future
      exercise.
      
      https://reviews.llvm.org/D70063
      83dcb34b
    • Sanjay Patel's avatar
  2. Nov 12, 2019