From a9248a2696e66ed9a5bae14076f360b034f32b8a Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 27 Aug 2015 18:54:41 +0000 Subject: [PATCH] Revert r246175 to get builder green again. llvm-svn: 246185 --- llvm/docs/tutorial/LangImpl4.rst | 2 +- .../Kaleidoscope/Chapter4/CMakeLists.txt | 2 -- llvm/examples/Kaleidoscope/Chapter4/toy.cpp | 4 ++-- .../Kaleidoscope/Chapter5/CMakeLists.txt | 2 -- llvm/examples/Kaleidoscope/Chapter5/toy.cpp | 4 ++-- .../Kaleidoscope/Chapter6/CMakeLists.txt | 2 -- llvm/examples/Kaleidoscope/Chapter6/toy.cpp | 4 ++-- .../Kaleidoscope/Chapter7/CMakeLists.txt | 2 -- llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 4 ++-- .../Kaleidoscope/Chapter8/CMakeLists.txt | 2 -- llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 4 ++-- llvm/test/CMakeLists.txt | 14 -------------- llvm/test/Examples/Kaleidoscope/Chapter3.test | 17 ----------------- llvm/test/Examples/Kaleidoscope/Chapter4.test | 17 ----------------- llvm/test/Examples/Kaleidoscope/Chapter5.test | 19 ------------------- llvm/test/Examples/Kaleidoscope/Chapter6.test | 15 --------------- llvm/test/Examples/Kaleidoscope/Chapter7.test | 15 --------------- llvm/test/Examples/lit.local.cfg | 2 -- llvm/test/Makefile | 1 - llvm/test/lit.cfg | 6 ------ llvm/test/lit.site.cfg.in | 1 - 21 files changed, 11 insertions(+), 128 deletions(-) delete mode 100644 llvm/test/Examples/Kaleidoscope/Chapter3.test delete mode 100644 llvm/test/Examples/Kaleidoscope/Chapter4.test delete mode 100644 llvm/test/Examples/Kaleidoscope/Chapter5.test delete mode 100644 llvm/test/Examples/Kaleidoscope/Chapter6.test delete mode 100644 llvm/test/Examples/Kaleidoscope/Chapter7.test delete mode 100644 llvm/test/Examples/lit.local.cfg diff --git a/llvm/docs/tutorial/LangImpl4.rst b/llvm/docs/tutorial/LangImpl4.rst index 92dcc3d33a0e..702886f6aec6 100644 --- a/llvm/docs/tutorial/LangImpl4.rst +++ b/llvm/docs/tutorial/LangImpl4.rst @@ -566,7 +566,7 @@ if we add: /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - fputc((char)X, stderr); + putchar((char)X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt index 89feed143adc..44e1aeecaaeb 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt @@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS add_kaleidoscope_chapter(Kaleidoscope-Ch4 toy.cpp ) - -export_executable_symbols(Kaleidoscope-Ch4) diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp index c102784b531d..12777ae2c758 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp @@ -632,13 +632,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - fputc((char)X, stderr); + putchar((char)X); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - fprintf(stderr, "%f\n", X); + printf("%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt index c0ae70654c36..b62ed410103f 100644 --- a/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt @@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS add_kaleidoscope_chapter(Kaleidoscope-Ch5 toy.cpp ) - -export_executable_symbols(Kaleidoscope-Ch5) diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp index 29db71c20a81..83af1776b20e 100644 --- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp @@ -906,13 +906,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - fputc((char)X, stderr); + putchar((char)X); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - fprintf(stderr, "%f\n", X); + printf("%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt index 49627f07ddf0..6bb2b1937527 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt @@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS add_kaleidoscope_chapter(Kaleidoscope-Ch6 toy.cpp ) - -export_executable_symbols(Kaleidoscope-Ch6) diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp index 8f802384d1df..e1bed45189e0 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp @@ -1024,13 +1024,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - fputc((char)X, stderr); + putchar((char)X); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - fprintf(stderr, "%f\n", X); + printf("%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt index e67d7928efe7..27c18cdd0654 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt @@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS add_kaleidoscope_chapter(Kaleidoscope-Ch7 toy.cpp ) - -export_executable_symbols(Kaleidoscope-Ch7) diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index be00f873e6d5..4558522952ce 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp @@ -1190,13 +1190,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - fputc((char)X, stderr); + putchar((char)X); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - fprintf(stderr, "%f\n", X); + printf("%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt b/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt index d9b5cc421be3..e335cb48ac7a 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt +++ b/llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt @@ -9,5 +9,3 @@ set(LLVM_LINK_COMPONENTS add_kaleidoscope_chapter(Kaleidoscope-Ch8 toy.cpp ) - -export_executable_symbols(Kaleidoscope-Ch8) diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index b78d901db2d5..7338c6ebc50b 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -1384,13 +1384,13 @@ static void MainLoop() { /// putchard - putchar that takes a double and returns 0. extern "C" double putchard(double X) { - fputc((char)X, stderr); + putchar((char)X); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. extern "C" double printd(double X) { - fprintf(stderr, "%f\n", X); + printf("%f\n", X); return 0; } diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt index 464a6f0161a9..1f417c2a0fc6 100644 --- a/llvm/test/CMakeLists.txt +++ b/llvm/test/CMakeLists.txt @@ -1,7 +1,3 @@ -if(LLVM_BUILD_EXAMPLES) - set(ENABLE_EXAMPLES 1) -endif() - configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg @@ -100,16 +96,6 @@ if(TARGET ocaml_llvm) ) endif() -if(LLVM_BUILD_EXAMPLES) - list(APPEND LLVM_TEST_DEPENDS - Kaleidoscope-Ch3 - Kaleidoscope-Ch4 - Kaleidoscope-Ch5 - Kaleidoscope-Ch6 - Kaleidoscope-Ch7 - ) -endif() - add_lit_testsuite(check-llvm "Running the LLVM regression tests" ${CMAKE_CURRENT_BINARY_DIR} PARAMS llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg diff --git a/llvm/test/Examples/Kaleidoscope/Chapter3.test b/llvm/test/Examples/Kaleidoscope/Chapter3.test deleted file mode 100644 index b9c8ba6fad8a..000000000000 --- a/llvm/test/Examples/Kaleidoscope/Chapter3.test +++ /dev/null @@ -1,17 +0,0 @@ -# RUN: Kaleidoscope-Ch3 < %s 2>&1 | FileCheck %s - -# Test basic parsing and IR generation. -def foo(x) x + 1; -foo(1); - -# CHECK: define double @foo(double %x) { -# CHECK-NEXT: entry: -# CHECK-NEXT: %addtmp = fadd double %x, 1.000000e+00 -# CHECK-NEXT: ret double %addtmp -# CHECK-NEXT: } - -# CHECK: define double @__anon_expr() { -# CHECK-NEXT: entry: -# CHECK-NEXT: %calltmp = call double @foo(double 1.000000e+00) -# CHECK-NEXT: ret double %calltmp -# CHECK-NEXT: } diff --git a/llvm/test/Examples/Kaleidoscope/Chapter4.test b/llvm/test/Examples/Kaleidoscope/Chapter4.test deleted file mode 100644 index 5fd0e42c9a6d..000000000000 --- a/llvm/test/Examples/Kaleidoscope/Chapter4.test +++ /dev/null @@ -1,17 +0,0 @@ -# RUN: Kaleidoscope-Ch4 < %s 2>&1 | FileCheck %s - -# Test basic definition, binding, and execution. -def foo(x) x + 1; -def bar(x) foo(2 * x); -bar(2); -# CHECK: Evaluated to 5.000000 - -# Test redefinition. -def foo(x) x + 2; -foo(2); -# CHECK: Evaluated to 4.000000 - -# Verify that 'bar' still calls the original 'foo'. -bar(2); -# CHECK: Evaluated to 5.000000 - diff --git a/llvm/test/Examples/Kaleidoscope/Chapter5.test b/llvm/test/Examples/Kaleidoscope/Chapter5.test deleted file mode 100644 index 1ad902378edb..000000000000 --- a/llvm/test/Examples/Kaleidoscope/Chapter5.test +++ /dev/null @@ -1,19 +0,0 @@ -# RUN: Kaleidoscope-Ch5 < %s 2>&1 | FileCheck %s - -# Test 'if' expression. -def foo(x) if x < 10 then 0 else 1; -foo(9); -foo(11); -# CHECK: Evaluated to 0.000000 -# CHECK: Evaluated to 1.000000 - -# Test 'for' expression. -extern printd(x); -for i = 1, i < 5, 1.0 in - printd(i); -# CHECK: 1.0 -# CHECK: 2.0 -# CHECK: 3.0 -# CHECK: 4.0 -# CHECK: 5.0 -# CHECK: Evaluated to 0.000000 \ No newline at end of file diff --git a/llvm/test/Examples/Kaleidoscope/Chapter6.test b/llvm/test/Examples/Kaleidoscope/Chapter6.test deleted file mode 100644 index cbdd01f52683..000000000000 --- a/llvm/test/Examples/Kaleidoscope/Chapter6.test +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: Kaleidoscope-Ch6 < %s 2>&1 | FileCheck %s - -# Test unary operator definition. -def unary-(x) 0 - x; -1 + (-1); -# CHECK: Evaluated to 0.000000 - -# Test binary operator definition. -def binary> 10 (lhs rhs) rhs < lhs; -def foo(x) if x > 10 then 0 else 1; -foo(9); -foo(11); -# CHECK: Evaluated to 1.000000 -# CHECK: Evaluated to 0.000000 - diff --git a/llvm/test/Examples/Kaleidoscope/Chapter7.test b/llvm/test/Examples/Kaleidoscope/Chapter7.test deleted file mode 100644 index 4843ca703aed..000000000000 --- a/llvm/test/Examples/Kaleidoscope/Chapter7.test +++ /dev/null @@ -1,15 +0,0 @@ -# RUN: Kaleidoscope-Ch7 < %s 2>&1 | FileCheck %s - -# Sequence operator and iterative fibonacci function to test user defined vars. -def binary : 1 (x y) y; - -def fibi(x) - var a = 1, b = 1, c in - (for i = 3, i < x in - c = a + b : - a = b : - b = c) : - b; - -fibi(10); -# CHECK: Evaluated to 55.000000 diff --git a/llvm/test/Examples/lit.local.cfg b/llvm/test/Examples/lit.local.cfg deleted file mode 100644 index d97a2a5b7a33..000000000000 --- a/llvm/test/Examples/lit.local.cfg +++ /dev/null @@ -1,2 +0,0 @@ -if not config.test_examples: - config.unsupported = True diff --git a/llvm/test/Makefile b/llvm/test/Makefile index 9b37cedaaffd..558762e39dc2 100644 --- a/llvm/test/Makefile +++ b/llvm/test/Makefile @@ -146,7 +146,6 @@ lit.site.cfg: FORCE @$(ECHOPATH) s=@HOST_ARCH@=$(HOST_ARCH)=g >> lit.tmp @$(ECHOPATH) s=@HAVE_LIBZ@=$(HAVE_LIBZ)=g >> lit.tmp @$(ECHOPATH) s=@HAVE_DIA_SDK@=0=g >> lit.tmp - @$(ECHOPATH) s=@ENABLE_EXAMPLES@=$(BUILD_EXAMPLES)=g >> lit.tmp @sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ @-rm -f lit.tmp diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index 38a2ec20ec8d..167a81afad1c 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -258,12 +258,6 @@ for pattern in [r"\bbugpoint\b(?!-)", r"\byaml2obj\b", r"\byaml-bench\b", r"\bverify-uselistorder\b", - r"\bKaleidoscope-Ch3\b", - r"\bKaleidoscope-Ch4\b", - r"\bKaleidoscope-Ch5\b", - r"\bKaleidoscope-Ch6\b", - r"\bKaleidoscope-Ch7\b", - r"\bKaleidoscope-Ch8\b", # Handle these specially as they are strings searched # for during testing. r"\| \bcount\b", diff --git a/llvm/test/lit.site.cfg.in b/llvm/test/lit.site.cfg.in index a18103796588..0b8ca65a18e7 100644 --- a/llvm/test/lit.site.cfg.in +++ b/llvm/test/lit.site.cfg.in @@ -35,7 +35,6 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" config.have_zlib = "@HAVE_LIBZ@" config.have_dia_sdk = @HAVE_DIA_SDK@ config.enable_ffi = "@LLVM_ENABLE_FFI@" -config.test_examples = "@ENABLE_EXAMPLES@" # Support substitution of the tools_dir with user parameters. This is # used when we can't determine the tool dir at configuration time.