Add examples dir, built with BUILD_EXAMPLES=1 (Makefiles, no CMake equivalent yet).

Move tools/wpa to examples/wpa, and unbreak its build.

llvm-svn: 88825
This commit is contained in:
Daniel Dunbar 2009-11-15 00:22:33 +00:00
parent d392dd0709
commit 9b30eb721f
5 changed files with 21 additions and 2 deletions

View File

@ -1,6 +1,12 @@
LEVEL = ../..
DIRS := include lib tools docs
PARALLEL_DIRS :=
ifeq ($(BUILD_EXAMPLES),1)
PARALLEL_DIRS += examples
endif
include $(LEVEL)/Makefile.common
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))

14
clang/examples/Makefile Normal file
View File

@ -0,0 +1,14 @@
##===- examples/Makefile -----------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../../..
PARALLEL_DIRS := wpa
include $(LEVEL)/Makefile.common

View File

@ -34,7 +34,6 @@ int main(int argc, char **argv) {
return 0;
TextDiagnosticBuffer DiagClient;
Diagnostic Diags(&DiagClient);
for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) {
const std::string &InFile = InputFilenames[i];
@ -42,7 +41,7 @@ int main(int argc, char **argv) {
std::string ErrMsg;
llvm::OwningPtr<ASTUnit> AST;
AST.reset(ASTUnit::LoadFromPCHFile(InFile, Diags, FileMgr, &ErrMsg));
AST.reset(ASTUnit::LoadFromPCHFile(InFile, &ErrMsg, &DiagClient));
if (!AST) {
llvm::errs() << "[" << InFile << "] error: " << ErrMsg << '\n';