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 | 9b30eb721f82e6afc02ba192f36ae17ad2a19dc4 (patch) | |
| tree | f7e726ca7adda0e251239039688b15a5a368057d | |
| parent | d392dd070941def91aade9c4411e1ffc8fc753ab (diff) | |
| download | bcm5719-llvm-9b30eb721f82e6afc02ba192f36ae17ad2a19dc4.tar.gz bcm5719-llvm-9b30eb721f82e6afc02ba192f36ae17ad2a19dc4.zip | |
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
| -rw-r--r-- | clang/Makefile | 6 | ||||
| -rw-r--r-- | clang/examples/Makefile | 14 | ||||
| -rw-r--r-- | clang/examples/wpa/CMakeLists.txt (renamed from clang/tools/wpa/CMakeLists.txt) | 0 | ||||
| -rw-r--r-- | clang/examples/wpa/Makefile (renamed from clang/tools/wpa/Makefile) | 0 | ||||
| -rw-r--r-- | clang/examples/wpa/clang-wpa.cpp (renamed from clang/tools/wpa/clang-wpa.cpp) | 3 |
5 files changed, 21 insertions, 2 deletions
diff --git a/clang/Makefile b/clang/Makefile index 22fe214705c..17ccc7320ec 100644 --- a/clang/Makefile +++ b/clang/Makefile @@ -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/clang/examples/Makefile b/clang/examples/Makefile new file mode 100644 index 00000000000..e6ae4b32cb3 --- /dev/null +++ b/clang/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/clang/tools/wpa/CMakeLists.txt b/clang/examples/wpa/CMakeLists.txt index 5553474b4bc..5553474b4bc 100644 --- a/clang/tools/wpa/CMakeLists.txt +++ b/clang/examples/wpa/CMakeLists.txt diff --git a/clang/tools/wpa/Makefile b/clang/examples/wpa/Makefile index 01dbd11b8df..01dbd11b8df 100644 --- a/clang/tools/wpa/Makefile +++ b/clang/examples/wpa/Makefile diff --git a/clang/tools/wpa/clang-wpa.cpp b/clang/examples/wpa/clang-wpa.cpp index 346634b6f61..4a0fe499395 100644 --- a/clang/tools/wpa/clang-wpa.cpp +++ b/clang/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'; |

