From 8b9adfea5e834eaee0f45d8cc7fb052d68df4a46 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 15 Dec 2009 00:06:45 +0000 Subject: Add -resource-dir to clang -cc1, this allows the base directory for compiler resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of computed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/index-test/index-test.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/index-test/index-test.cpp') diff --git a/tools/index-test/index-test.cpp b/tools/index-test/index-test.cpp index 8b12c0ba8c..ff9fd54311 100644 --- a/tools/index-test/index-test.cpp +++ b/tools/index-test/index-test.cpp @@ -224,11 +224,10 @@ ASTUnit *CreateFromSource(const std::string &Filename, Diagnostic &Diags, Args.push_back(CompilerArgs[i].c_str()); void *MainAddr = (void*) (intptr_t) CreateFromSource; - llvm::sys::Path ResourcesPath( - CompilerInvocation::GetBuiltinIncludePath(Argv0, MainAddr)); - ResourcesPath.eraseComponent(); + std::string ResourceDir = + CompilerInvocation::GetResourcesPath(Argv0, MainAddr); return ASTUnit::LoadFromCommandLine(Args.data(), Args.data() + Args.size(), - Diags, ResourcesPath.str()); + Diags, ResourceDir); } int main(int argc, char **argv) { -- cgit v1.2.3-18-g5258