aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-19 22:27:32 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-19 22:27:32 +0000
commitc46e463f13bc50535b48149f6d022cd373cfb486 (patch)
tree81756894b0802ca6ab90501cd0871defd82484fc
parent1374598619f83e6b2de91341a326eae564ece2cb (diff)
Fix inverted preprocessor guard, and fix the resulting compiler error that was unmasked.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84555 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/CIndex/CIndex.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 77e7589269..db7b9f3934 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -384,11 +384,11 @@ CXTranslationUnit clang_createTranslationUnitFromSourceFile(
argv.push_back(NULL);
// Generate the AST file in a separate process.
-#ifdef LLVM_ON_WIN32
- llvm::sys::Path DevNull("/dev/null")
- llvm::sys::Path *Redirects[] = { &DevNull, &DevNull, &DevNull, NULL };
- llvm::sys::Program::ExecuteAndWait(ClangPath, &argv[0],
- !displayDiagnostics ? Redirects : NULL);
+#ifndef LLVM_ON_WIN32
+ llvm::sys::Path DevNull("/dev/null");
+ const llvm::sys::Path *Redirects[] = { &DevNull, &DevNull, &DevNull, NULL };
+ llvm::sys::Program::ExecuteAndWait(ClangPath, &argv[0], NULL,
+ !displayDiagnostics ? &Redirects[0] :NULL);
#else
// FIXME: I don't know what is the equivalent '/dev/null' redirect for
// Windows for this API.