From: Alp Toker Date: Wed, 9 Jul 2014 01:37:36 +0000 (+0000) Subject: clang-interpreter: don't check input file existence, we're in-process X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00350578c0fcb52394e5694b1dad208077b829e1;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212585 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp index fb9d298f0a..8b8ccfdf70 100644 --- a/examples/clang-interpreter/main.cpp +++ b/examples/clang-interpreter/main.cpp @@ -77,6 +77,7 @@ int main(int argc, const char **argv, char * const *envp) { 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