diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-15 00:22:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-15 00:22:33 +0000 |
commit | 297b0833ad283e0e0a9003fe6c5eadeedc6614d5 (patch) | |
tree | 1a2583805aaec57e27f316781c20f01ef87bf273 | |
parent | d10c5b88334d860d19284032a7126dc2219f57ed (diff) |
Add examples dir, built with BUILD_EXAMPLES=1 (Makefiles, no CMake equivalent yet).
Move tools/wpa to examples/wpa, and unbreak its build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88825 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | examples/Makefile | 14 | ||||
-rw-r--r-- | examples/wpa/CMakeLists.txt (renamed from tools/wpa/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | examples/wpa/Makefile (renamed from tools/wpa/Makefile) | 0 | ||||
-rw-r--r-- | examples/wpa/clang-wpa.cpp (renamed from tools/wpa/clang-wpa.cpp) | 3 |
5 files changed, 21 insertions, 2 deletions
@@ -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)) diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000000..e6ae4b32cb --- /dev/null +++ b/examples/Makefile @@ -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 diff --git a/tools/wpa/CMakeLists.txt b/examples/wpa/CMakeLists.txt index 5553474b4b..5553474b4b 100644 --- a/tools/wpa/CMakeLists.txt +++ b/examples/wpa/CMakeLists.txt diff --git a/tools/wpa/Makefile b/examples/wpa/Makefile index 01dbd11b8d..01dbd11b8d 100644 --- a/tools/wpa/Makefile +++ b/examples/wpa/Makefile diff --git a/tools/wpa/clang-wpa.cpp b/examples/wpa/clang-wpa.cpp index 346634b6f6..4a0fe49939 100644 --- a/tools/wpa/clang-wpa.cpp +++ b/examples/wpa/clang-wpa.cpp @@ -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'; |