From e28968828b1c35719bd87c459a74ec6ba98d4e07 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 19 Oct 2009 22:27:32 +0000 Subject: [PATCH] Fix inverted preprocessor guard, and fix the resulting compiler error that was unmasked. llvm-svn: 84555 --- clang/tools/CIndex/CIndex.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 77e7589269f2..db7b9f39347d 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/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.