diff options
| author | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-08-28 03:34:33 +0000 |
|---|---|---|
| committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-08-28 03:34:33 +0000 |
| commit | ac9d37311698f5b5fa496c86d04216d91b05d768 (patch) | |
| tree | 5be007ed6b42e97555b487f773b91790b3936207 /llvm/examples | |
| parent | 004653755cda3df3d31586db91d6b202ee261e7d (diff) | |
| download | bcm5719-llvm-ac9d37311698f5b5fa496c86d04216d91b05d768.tar.gz bcm5719-llvm-ac9d37311698f5b5fa496c86d04216d91b05d768.zip | |
Kaleidoscope: Prune __attribute__((used)). Some compilers wouldn't accept one.
llvm-svn: 246268
Diffstat (limited to 'llvm/examples')
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter4/toy.cpp | 4 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter5/toy.cpp | 4 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter6/toy.cpp | 4 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 4 | ||||
| -rw-r--r-- | llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp index fe8ec17b4e8..c102784b531 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp @@ -631,13 +631,13 @@ static void MainLoop() { //===----------------------------------------------------------------------===// /// putchard - putchar that takes a double and returns 0. -__attribute__((used)) extern "C" double putchard(double X) { +extern "C" double putchard(double X) { fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. -__attribute__((used)) extern "C" double printd(double X) { +extern "C" double printd(double X) { fprintf(stderr, "%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp index 4658edcd4ce..29db71c20a8 100644 --- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp @@ -905,13 +905,13 @@ static void MainLoop() { //===----------------------------------------------------------------------===// /// putchard - putchar that takes a double and returns 0. -__attribute__((used)) extern "C" double putchard(double X) { +extern "C" double putchard(double X) { fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. -__attribute__((used)) extern "C" double printd(double X) { +extern "C" double printd(double X) { fprintf(stderr, "%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp index 9d9914a4b89..8f802384d1d 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp @@ -1023,13 +1023,13 @@ static void MainLoop() { //===----------------------------------------------------------------------===// /// putchard - putchar that takes a double and returns 0. -__attribute__((used)) extern "C" double putchard(double X) { +extern "C" double putchard(double X) { fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. -__attribute__((used)) extern "C" double printd(double X) { +extern "C" double printd(double X) { fprintf(stderr, "%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index d61d880e540..be00f873e6d 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp @@ -1189,13 +1189,13 @@ static void MainLoop() { //===----------------------------------------------------------------------===// /// putchard - putchar that takes a double and returns 0. -__attribute__((used)) extern "C" double putchard(double X) { +extern "C" double putchard(double X) { fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. -__attribute__((used)) extern "C" double printd(double X) { +extern "C" double printd(double X) { fprintf(stderr, "%f\n", X); return 0; } diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 5f97a157336..b78d901db2d 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -1383,13 +1383,13 @@ static void MainLoop() { //===----------------------------------------------------------------------===// /// putchard - putchar that takes a double and returns 0. -__attribute__((used)) extern "C" double putchard(double X) { +extern "C" double putchard(double X) { fputc((char)X, stderr); return 0; } /// printd - printf that takes a double prints it as "%f\n", returning 0. -__attribute__((used)) extern "C" double printd(double X) { +extern "C" double printd(double X) { fprintf(stderr, "%f\n", X); return 0; } |

