[llvm-commits] CVS: llvm/runtime/libprofile/BlockProfiling.c CommonProfiling.c FunctionProfiling.c Profiling.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 10 11:37:01 PST 2004
Changes in directory llvm/runtime/libprofile:
BlockProfiling.c updated: 1.1 -> 1.2
CommonProfiling.c updated: 1.3 -> 1.4
FunctionProfiling.c updated: 1.1 -> 1.2
Profiling.h updated: 1.1 -> 1.2
---
Log message:
Make the initialization calls return argc.
---
Diffs of the changes: (+13 -9)
Index: llvm/runtime/libprofile/BlockProfiling.c
diff -u llvm/runtime/libprofile/BlockProfiling.c:1.1 llvm/runtime/libprofile/BlockProfiling.c:1.2
--- llvm/runtime/libprofile/BlockProfiling.c:1.1 Tue Oct 28 12:56:51 2003
+++ llvm/runtime/libprofile/BlockProfiling.c Tue Feb 10 11:36:25 2004
@@ -34,10 +34,11 @@
/* llvm_start_block_profiling - This is the main entry point of the block
* profiling library. It is responsible for setting up the atexit handler.
*/
-void llvm_start_block_profiling(int argc, const char **argv,
- unsigned *arrayStart, unsigned numElements) {
- save_arguments(argc, argv);
+int llvm_start_block_profiling(int argc, const char **argv,
+ unsigned *arrayStart, unsigned numElements) {
+ int Ret = save_arguments(argc, argv);
ArrayStart = arrayStart;
NumElements = numElements;
atexit(BlockProfAtExitHandler);
+ return Ret;
}
Index: llvm/runtime/libprofile/CommonProfiling.c
diff -u llvm/runtime/libprofile/CommonProfiling.c:1.3 llvm/runtime/libprofile/CommonProfiling.c:1.4
--- llvm/runtime/libprofile/CommonProfiling.c:1.3 Tue Oct 28 16:45:25 2003
+++ llvm/runtime/libprofile/CommonProfiling.c Tue Feb 10 11:36:25 2004
@@ -27,9 +27,9 @@
/* save_arguments - Save argc and argv as passed into the program for the file
* we output.
*/
-void save_arguments(int argc, const char **argv) {
+int save_arguments(int argc, const char **argv) {
unsigned Length, i;
- if (SavedArgs || !argv) return; /* This can be called multiple times */
+ if (SavedArgs || !argv) return argc; /* This can be called multiple times */
for (Length = 0, i = 0; i != (unsigned)argc; ++i)
Length += strlen(argv[i])+1;
@@ -43,6 +43,8 @@
}
SavedArgsLength = Length;
+
+ return argc;
}
Index: llvm/runtime/libprofile/FunctionProfiling.c
diff -u llvm/runtime/libprofile/FunctionProfiling.c:1.1 llvm/runtime/libprofile/FunctionProfiling.c:1.2
--- llvm/runtime/libprofile/FunctionProfiling.c:1.1 Tue Oct 28 12:56:51 2003
+++ llvm/runtime/libprofile/FunctionProfiling.c Tue Feb 10 11:36:25 2004
@@ -32,10 +32,11 @@
/* llvm_start_func_profiling - This is the main entry point of the function
* profiling library. It is responsible for setting up the atexit handler.
*/
-void llvm_start_func_profiling(int argc, const char **argv,
- unsigned *arrayStart, unsigned numElements) {
- save_arguments(argc, argv);
+int llvm_start_func_profiling(int argc, const char **argv,
+ unsigned *arrayStart, unsigned numElements) {
+ int Ret = save_arguments(argc, argv);
ArrayStart = arrayStart;
NumElements = numElements;
atexit(FuncProfAtExitHandler);
+ return Ret;
}
Index: llvm/runtime/libprofile/Profiling.h
diff -u llvm/runtime/libprofile/Profiling.h:1.1 llvm/runtime/libprofile/Profiling.h:1.2
--- llvm/runtime/libprofile/Profiling.h:1.1 Tue Oct 28 12:56:51 2003
+++ llvm/runtime/libprofile/Profiling.h Tue Feb 10 11:36:25 2004
@@ -18,7 +18,7 @@
/* save_arguments - Save argc and argv as passed into the program for the file
* we output.
*/
-void save_arguments(int argc, const char **argv);
+int save_arguments(int argc, const char **argv);
enum ProfilingType {
Arguments = 1, /* The command line argument block */
More information about the llvm-commits
mailing list