|*
|* The LLVM Compiler Infrastructure
|*
-|* This file was developed by the LLVM research group and is distributed under
-|* the University of Illinois Open Source License. See LICENSE.TXT for details.
+|* This file is distributed under the University of Illinois Open Source
+|* License. See LICENSE.TXT for details.
|*
|*===----------------------------------------------------------------------===*|
|*
* what to do with it.
*/
const char *Arg = argv[1];
- memmove(&argv[1], &argv[2], (argc-2)*sizeof(char*));
+ memmove(&argv[1], &argv[2], (argc-1)*sizeof(char*));
--argc;
if (!strcmp(Arg, "-llvmprof-output")) {
puts("-llvmprof-output requires a filename argument!");
else {
OutputFilename = strdup(argv[1]);
- memmove(&argv[1], &argv[2], (argc-2)*sizeof(char*));
+ memmove(&argv[1], &argv[2], (argc-1)*sizeof(char*));
--argc;
}
} else {
* appending, creating it if it does not already exist.
*/
if (OutFile == -1) {
- off_t Offset;
OutFile = open(OutputFilename, O_CREAT | O_WRONLY | O_APPEND, 0666);
if (OutFile == -1) {
fprintf(stderr, "LLVM profiling runtime: while opening '%s': ",
/* Output the command line arguments to the file. */
{
- int PTy = Arguments;
+ int PTy = ArgumentInfo;
int Zeros = 0;
write(OutFile, &PTy, sizeof(int));
write(OutFile, &SavedArgsLength, sizeof(unsigned));