r212585 - clang-interpreter: don't check input file existence, we're in-process

Alp Toker alp at nuanti.com
Tue Jul 8 18:37:36 PDT 2014


Author: alp
Date: Tue Jul  8 20:37:36 2014
New Revision: 212585

URL: http://llvm.org/viewvc/llvm-project?rev=212585&view=rev
Log:
clang-interpreter: don't check input file existence, we're in-process

This flag is set by most other tools and avoids extra stat() calls. The
frontend will diagnose anyway as it performs the check atomically while opening
files at point of use.

We could probably make Driver::CheckInputsExist default to false and only
enable it in the main 'clang' binary, or even better only perform the checks if
we know the tool is external but that needs more thought.

Modified:
    cfe/trunk/examples/clang-interpreter/main.cpp

Modified: cfe/trunk/examples/clang-interpreter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/main.cpp?rev=212585&r1=212584&r2=212585&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/main.cpp (original)
+++ cfe/trunk/examples/clang-interpreter/main.cpp Tue Jul  8 20:37:36 2014
@@ -77,6 +77,7 @@ int main(int argc, const char **argv, ch
   DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
   Driver TheDriver(Path, llvm::sys::getProcessTriple(), Diags);
   TheDriver.setTitle("clang interpreter");
+  TheDriver.setCheckInputsExist(false);
 
   // FIXME: This is a hack to try to force the driver to do something we can
   // recognize. We need to extend the driver library to support this use model





More information about the cfe-commits mailing list