summaryrefslogtreecommitdiffstats
path: root/clang/tools/index-test/index-test.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-15 00:06:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-15 00:06:45 +0000
commita5a166d01a732ecc7f09f4b763ae6b939df5f0ff (patch)
tree783bb984aa6f52610808294757cef08e617bf8fd /clang/tools/index-test/index-test.cpp
parent7dc42e5d4c568b596012019d8535ba6f92b3c338 (diff)
downloadbcm5719-llvm-a5a166d01a732ecc7f09f4b763ae6b939df5f0ff.tar.gz
bcm5719-llvm-a5a166d01a732ecc7f09f4b763ae6b939df5f0ff.zip
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. llvm-svn: 91370
Diffstat (limited to 'clang/tools/index-test/index-test.cpp')
-rw-r--r--clang/tools/index-test/index-test.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/tools/index-test/index-test.cpp b/clang/tools/index-test/index-test.cpp
index 8b12c0ba8cd..ff9fd543115 100644
--- a/clang/tools/index-test/index-test.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud