r236459 - [clang-fuzzer] make clang-fuzzer slightly faster by removing one redundant directory scan

Kostya Serebryany kcc at google.com
Mon May 4 14:14:45 PDT 2015


Author: kcc
Date: Mon May  4 16:14:45 2015
New Revision: 236459

URL: http://llvm.org/viewvc/llvm-project?rev=236459&view=rev
Log:
[clang-fuzzer] make clang-fuzzer slightly faster by removing one redundant directory scan

Modified:
    cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp

Modified: cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp?rev=236459&r1=236458&r2=236459&view=diff
==============================================================================
--- cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp (original)
+++ cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp Mon May  4 16:14:45 2015
@@ -24,7 +24,7 @@ extern "C" void TestOneInput(uint8_t *da
   std::string s((const char *)data, size);
   llvm::opt::ArgStringList CC1Args;
   CC1Args.push_back("-cc1");
-  CC1Args.push_back("test.cc");
+  CC1Args.push_back("./test.cc");
   llvm::IntrusiveRefCntPtr<FileManager> Files(
       new FileManager(FileSystemOptions()));
   IgnoringDiagConsumer Diags;
@@ -36,7 +36,7 @@ extern "C" void TestOneInput(uint8_t *da
       tooling::newInvocation(&Diagnostics, CC1Args));
   std::unique_ptr<llvm::MemoryBuffer> Input =
       llvm::MemoryBuffer::getMemBuffer(s);
-  Invocation->getPreprocessorOpts().addRemappedFile("test.cc", Input.release());
+  Invocation->getPreprocessorOpts().addRemappedFile("./test.cc", Input.release());
   std::unique_ptr<tooling::ToolAction> action(
       tooling::newFrontendActionFactory<clang::SyntaxOnlyAction>());
   action->runInvocation(Invocation.release(), Files.get(), &Diags);





More information about the cfe-commits mailing list