summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerDefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDefs.h')
-rw-r--r--llvm/lib/Fuzzer/FuzzerDefs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDefs.h b/llvm/lib/Fuzzer/FuzzerDefs.h
index 99b478ff6ed..6a9e323d429 100644
--- a/llvm/lib/Fuzzer/FuzzerDefs.h
+++ b/llvm/lib/Fuzzer/FuzzerDefs.h
@@ -117,5 +117,10 @@ struct ScopedDoingMyOwnMemmem {
~ScopedDoingMyOwnMemmem();
};
+inline uint8_t Bswap(uint8_t x) { return x; }
+inline uint16_t Bswap(uint16_t x) { return __builtin_bswap16(x); }
+inline uint32_t Bswap(uint32_t x) { return __builtin_bswap32(x); }
+inline uint64_t Bswap(uint64_t x) { return __builtin_bswap64(x); }
+
} // namespace fuzzer
#endif // LLVM_FUZZER_DEFS_H
OpenPOWER on IntegriCloud