diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-15 00:06:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-15 00:06:45 +0000 |
commit | 8b9adfea5e834eaee0f45d8cc7fb052d68df4a46 (patch) | |
tree | 0ca64758fa0162c3ab4caa04fd2705983d455503 /tools/index-test/index-test.cpp | |
parent | 71d1740c94060b424bb745d6c6973ff27cfdee06 (diff) |
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
Diffstat (limited to 'tools/index-test/index-test.cpp')
-rw-r--r-- | tools/index-test/index-test.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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) { |