diff options
| author | Xinliang David Li <davidxl@google.com> | 2016-06-08 23:43:56 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2016-06-08 23:43:56 +0000 |
| commit | e2ce2e002067ce6560211a30626a7e7e3329fab6 (patch) | |
| tree | a418c6b8674ba8a7f012c41d8098ea6aa963063a /compiler-rt/lib/profile/InstrProfilingPort.h | |
| parent | 2c6469687d6e9c65f8060ced5768a36864784a13 (diff) | |
| download | bcm5719-llvm-e2ce2e002067ce6560211a30626a7e7e3329fab6.tar.gz bcm5719-llvm-e2ce2e002067ce6560211a30626a7e7e3329fab6.zip | |
[profile] in-process merging support part-3
Differential Revision: http://reviews.llvm.org/D21056
llvm-svn: 272227
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingPort.h')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingPort.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h b/compiler-rt/lib/profile/InstrProfilingPort.h index 4efd1a32b3a..af96b221fab 100644 --- a/compiler-rt/lib/profile/InstrProfilingPort.h +++ b/compiler-rt/lib/profile/InstrProfilingPort.h @@ -14,12 +14,16 @@ #define COMPILER_RT_ALIGNAS(x) __declspec(align(x)) #define COMPILER_RT_VISIBILITY #define COMPILER_RT_WEAK __declspec(selectany) +/* Need to include <windows.h> */ #define COMPILER_RT_ALLOCA _alloca +/* Need to include <stdio.h> and <io.h> */ +#define COMPILER_RT_FTRUNCATE(f,l) _chsize(_fileno(f),l) #elif __GNUC__ #define COMPILER_RT_ALIGNAS(x) __attribute__((aligned(x))) #define COMPILER_RT_VISIBILITY __attribute__((visibility("hidden"))) #define COMPILER_RT_WEAK __attribute__((weak)) #define COMPILER_RT_ALLOCA __builtin_alloca +#define COMPILER_RT_FTRUNCATE(f,l) ftruncate(fileno(f),l) #endif #if defined(__APPLE__) |

