llvm.org GIT mirror llvm / 51c7ae8
Kaleidoscope: Prune __attribute__((used)). Some compilers wouldn't accept one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246268 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 4 years ago
5 changed file(s) with 10 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
630630 //===----------------------------------------------------------------------===//
631631
632632 /// putchard - putchar that takes a double and returns 0.
633 __attribute__((used)) extern "C" double putchard(double X) {
633 extern "C" double putchard(double X) {
634634 fputc((char)X, stderr);
635635 return 0;
636636 }
637637
638638 /// printd - printf that takes a double prints it as "%f\n", returning 0.
639 __attribute__((used)) extern "C" double printd(double X) {
639 extern "C" double printd(double X) {
640640 fprintf(stderr, "%f\n", X);
641641 return 0;
642642 }
904904 //===----------------------------------------------------------------------===//
905905
906906 /// putchard - putchar that takes a double and returns 0.
907 __attribute__((used)) extern "C" double putchard(double X) {
907 extern "C" double putchard(double X) {
908908 fputc((char)X, stderr);
909909 return 0;
910910 }
911911
912912 /// printd - printf that takes a double prints it as "%f\n", returning 0.
913 __attribute__((used)) extern "C" double printd(double X) {
913 extern "C" double printd(double X) {
914914 fprintf(stderr, "%f\n", X);
915915 return 0;
916916 }
10221022 //===----------------------------------------------------------------------===//
10231023
10241024 /// putchard - putchar that takes a double and returns 0.
1025 __attribute__((used)) extern "C" double putchard(double X) {
1025 extern "C" double putchard(double X) {
10261026 fputc((char)X, stderr);
10271027 return 0;
10281028 }
10291029
10301030 /// printd - printf that takes a double prints it as "%f\n", returning 0.
1031 __attribute__((used)) extern "C" double printd(double X) {
1031 extern "C" double printd(double X) {
10321032 fprintf(stderr, "%f\n", X);
10331033 return 0;
10341034 }
11881188 //===----------------------------------------------------------------------===//
11891189
11901190 /// putchard - putchar that takes a double and returns 0.
1191 __attribute__((used)) extern "C" double putchard(double X) {
1191 extern "C" double putchard(double X) {
11921192 fputc((char)X, stderr);
11931193 return 0;
11941194 }
11951195
11961196 /// printd - printf that takes a double prints it as "%f\n", returning 0.
1197 __attribute__((used)) extern "C" double printd(double X) {
1197 extern "C" double printd(double X) {
11981198 fprintf(stderr, "%f\n", X);
11991199 return 0;
12001200 }
13821382 //===----------------------------------------------------------------------===//
13831383
13841384 /// putchard - putchar that takes a double and returns 0.
1385 __attribute__((used)) extern "C" double putchard(double X) {
1385 extern "C" double putchard(double X) {
13861386 fputc((char)X, stderr);
13871387 return 0;
13881388 }
13891389
13901390 /// printd - printf that takes a double prints it as "%f\n", returning 0.
1391 __attribute__((used)) extern "C" double printd(double X) {
1391 extern "C" double printd(double X) {
13921392 fprintf(stderr, "%f\n", X);
13931393 return 0;
13941394 }