summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfilingFile.c
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-12-14 18:50:13 +0000
committerVedant Kumar <vsk@apple.com>2017-12-14 18:50:13 +0000
commite8e8599adee0fad6365b058cf801718f0414fdb7 (patch)
treefd8ff4546ebff32585c2c65203e082d6cd9f9555 /compiler-rt/lib/profile/InstrProfilingFile.c
parenta1cedd6c46705aac4d78e827c6ca6a365fbafa32 (diff)
downloadbcm5719-llvm-e8e8599adee0fad6365b058cf801718f0414fdb7.tar.gz
bcm5719-llvm-e8e8599adee0fad6365b058cf801718f0414fdb7.zip
Revert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the runtime to Solaris"
This reverts commit r320726. It looks like flock isn't available on Windows: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21317/steps/build%20compiler-rt/logs/stdio llvm-svn: 320728
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingFile.c')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingFile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index d7c0abbc16e..8ae2b7d986b 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -7,6 +7,9 @@
|*
\*===----------------------------------------------------------------------===*/
+#include "InstrProfiling.h"
+#include "InstrProfilingInternal.h"
+#include "InstrProfilingUtil.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -28,10 +31,6 @@
#endif
#endif
-#include "InstrProfiling.h"
-#include "InstrProfilingInternal.h"
-#include "InstrProfilingUtil.h"
-
/* From where is profile name specified.
* The order the enumerators define their
* precedence. Re-order them may lead to
@@ -86,6 +85,7 @@ typedef struct lprofFilename {
COMPILER_RT_WEAK lprofFilename lprofCurFilename = {0, 0, 0, {0}, {0},
0, 0, 0, PNS_unknown};
+int getpid(void);
static int getCurFilenameLength();
static const char *getCurFilename(char *FilenameBuf);
static unsigned doMerging() { return lprofCurFilename.MergePoolSize; }
@@ -325,7 +325,7 @@ static int parseFilenamePattern(const char *FilenamePat,
if (FilenamePat[I] == '%') {
if (FilenamePat[++I] == 'p') {
if (!NumPids++) {
- if (snprintf(PidChars, MAX_PID_SIZE, "%ld", (long)getpid()) <= 0) {
+ if (snprintf(PidChars, MAX_PID_SIZE, "%d", getpid()) <= 0) {
PROF_WARN("Unable to get pid for filename pattern %s. Using the "
"default name.",
FilenamePat);
OpenPOWER on IntegriCloud