llvm.org GIT mirror llvm / 210329a
remove an obsolete library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41850 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
3 changed file(s) with 0 addition(s) and 165 deletion(s). Raw diff Collapse all Expand all
+0
-19
runtime/libdummy/Makefile less more
None ##===- runtime/libdummy/Makefile ---------------------------*- Makefile -*-===##
1 #
2 # The LLVM Compiler Infrastructure
3 #
4 # This file was developed by the LLVM research group and is distributed under
5 # the University of Illinois Open Source License. See LICENSE.TXT for details.
6 #
7 ##===----------------------------------------------------------------------===##
8
9 LEVEL = ../..
10 BYTECODE_LIBRARY = 1
11 DONT_BUILD_RELINKED = 1
12 LIBRARYNAME = dummy
13 BYTECODE_DESTINATION = $(CFERuntimeLibDir)
14
15 include $(LEVEL)/Makefile.common
16
17 CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts))
18 CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts))
+0
-2
runtime/libdummy/README.txt less more
None This directory contains stub routines which are occasionally useful when
1 performing alias analysis research.
+0
-144
runtime/libdummy/dummylib.c less more
None #include
1 #include
2 #include
3 #include
4 #include
5 #include
6 #include
7 #include
8
9 #if 0
10 int stat(const char *file_name, struct stat *buf) { return 0; }
11 int fstat(int filedes, struct stat *buf) { return 0; }
12 int lstat(const char *file_name, struct stat *buf) { return 0; }
13
14 // Varargs function definitions
15 int ioctl(int d, int request, ...) {return 0; }
16 int printf(const char *X) {return 0; }
17 int sscanf(const char *X, const char *Y, ...) { return 0; }
18 int fprintf(FILE *stream, const char *format, ...) { return 0; }
19
20
21 int gettimeofday(struct timeval *tv, void *tz) { return 0; }
22 void *xmalloc(size_t X) { return malloc(X); }
23
24 void srand(unsigned x) {}
25 double exp(double x) { return 0; }
26 double log(double x) { return 0; }
27 double sqrt(double x) { return 0; }
28 void exit(int x) {}
29 int puts(const char *x) { return 0; }
30 void __main() {}
31 int atoi(const char*x) { return 1; }
32 char *fgets(char*Ptr, int x, FILE*F) { return Ptr; }
33 char *gets(char *C) { return C; }
34 int fclose(FILE*F) { return 0; }
35 FILE *fopen(const char *n, const char*x) { return malloc(sizeof(FILE)); }
36 FILE *freopen(const char *path, const char *mode, FILE *stream) { return 0; }
37 int fflush(FILE *F) { return 0; }
38 size_t fwrite(const void* str, size_t N, size_t n, FILE *F) { return N; }
39 void *memset(void *P, int X, size_t N) { return P; }
40 void *memcpy(void *P, void *S, size_t N) { return P; }
41 void *memmove(void *P, void *S, size_t N) { return P; }
42 char *strcpy(char*Str1, const char *Str) { return Str1; }
43 char *strcat(char*Str1, const char *Str) { return Str1; }
44 size_t strlen(char *X) { return 0; }
45 #undef putchar
46 int putchar(int N) { return N; }
47 int putc(int c, FILE *stream) { return c; }
48 int fputc(int c, FILE *stream) { return c; }
49 int fgetc(FILE *S) { return 0; }
50 long ftell(FILE *F) { return 0; }
51 int getc(FILE *S) { return 0; }
52 size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { return 0; }
53 int fseek(FILE *stream, long offset, int whence) { return 0; }
54 int feof(FILE *stream) { return 0; }
55 int fputs(const char *s, char *stream) { return 0; }
56 int ferror(FILE *F) { return 0; }
57 FILE *fdopen(int fildes, const char *mode) { return 0;}
58 FILE *popen(const char *command, const char *type) { return 0; }
59 int pclose(FILE *stream) { return 0; }
60
61 int ungetc(int c, FILE *stream) { return 0; }
62 int setvbuf(FILE *stream, char *buf, int mode , size_t size) { return 0; }
63 void rewind(FILE*F) { }
64 int fileno(FILE *stream) { return 1; }
65 char *ttyname(int desc) { return 0; }
66 long sysconf(int name) { return 0; }
67 char *tmpnam(char *s) { return s; }
68
69 void *calloc(size_t A, size_t B) { return malloc(A*B); }
70 void *realloc(void *ptr, size_t N) { return ptr; }
71 const char *strerror(int N) { return 0; }
72 int unlink(const char *path) { return 0; }
73 void perror(const char *err) {}
74 char *strrchr(const char *S, int C) { return (char*)S; }
75 int memcmp(const char *A, const char *B, size_t N) { return 0; }
76 ssize_t read(int fildes, void *buf, size_t nbyte) { return nbyte; }
77 int close(int FD) { return 0; }
78 int rename(const char *oldpath, const char *newpath) { return 0; }
79 ssize_t write(int fd, const void *buf, size_t count) { return 0; }
80 pid_t getpid(void) { return 0; }
81 pid_t getppid(void) { return 0; }
82 void setbuf(FILE *stream, char *buf) {}
83 int isatty(int desc) { return 0; }
84 int vsprintf(char *str, const char *format, va_list ap) { return 0; }
85 char *getcwd(char *buf, size_t size) { return buf; }
86
87 void qsort(void *base, size_t nmemb, size_t size,
88 int(*compar)(const void *, const void *)) {
89 compar(base, base);
90 }
91
92
93
94 #include
95 clock_t times(struct tms *buf) { return 0; }
96
97
98 #include
99 int setjmp(jmp_buf env) { return 0; }
100 void longjmp(jmp_buf env, int val) {}
101 int kill(pid_t pid, int sig) { return 0; }
102 int system(const char *string) { return 0; }
103 char *getenv(const char *name) { return 0; }
104 typedef void (*sighandler_t)(int);
105
106 sighandler_t signal(int signum, sighandler_t handler) { return handler; }
107
108
109
110
111 char *strchr(const char *s, int c) { return (char*)s; }
112 int strcmp(const char *s1, const char *s2) { return 0; }
113 int strncmp(const char *s1, const char *s2, size_t n) { return 0; }
114 char *strncpy(char *s1, const char *s2, size_t n) { return s1; }
115 char *strpbrk(const char *s, const char *accept) { return (char*)s; }
116 char *strncat(char *dest, const char *src, size_t n) { return dest; }
117
118 double atof(const char *C) { return 0; }
119
120
121 long clock() { return 0; }
122 char *ctime(const time_t *timep) { return 0; }
123 time_t time(time_t *t) { return *t = 0; }
124
125 double sin(double x) { return x; }
126 double cos(double x) { return x; }
127 double tan(double x) { return x; }
128 double asin(double x) { return x; }
129 double acos(double x) { return x; }
130 double atan(double x) { return x; }
131 double cosh(double x) { return x; }
132 double sinh(double x) { return x; }
133 double ceil(double x) { return x; }
134 double floor(double x) { return x; }
135
136 double atan2(double x, double y) { return x; }
137 double fmod(double x, double y) { return x; }
138 double pow(double x, double y) { return x; }
139
140 int tolower(int x) { return x; }
141 int toupper(int x) { return x; }
142
143 #endif