summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerDefs.h
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2017-08-26 17:50:35 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2017-08-26 17:50:35 +0000
commit24069a0424ca47397850b46d9c7385c123a28033 (patch)
tree331b20f32a49d7b355249375f4113aaee26aaa09 /compiler-rt/lib/fuzzer/FuzzerDefs.h
parentd50410bfb1d1fe12e58ea777186501ab7ce1d2a0 (diff)
downloadbcm5719-llvm-24069a0424ca47397850b46d9c7385c123a28033.tar.gz
bcm5719-llvm-24069a0424ca47397850b46d9c7385c123a28033.zip
Revert "[libFuzzer] Use custom allocators for STL containers in libFuzzer"
This reverts commit 3539efc2f2218dba2bcbd645d0fe276f2b5cf588. llvm-svn: 311831
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerDefs.h')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerDefs.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerDefs.h b/compiler-rt/lib/fuzzer/FuzzerDefs.h
index 5e5d3afa2f2..bbb44514aab 100644
--- a/compiler-rt/lib/fuzzer/FuzzerDefs.h
+++ b/compiler-rt/lib/fuzzer/FuzzerDefs.h
@@ -18,8 +18,6 @@
#include <cstring>
#include <string>
#include <vector>
-#include <set>
-#include <memory>
// Platform detection.
#ifdef __linux__
@@ -104,19 +102,8 @@ struct ExternalFunctions;
// Global interface to functions that may or may not be available.
extern ExternalFunctions *EF;
-// We are using a custom allocator to give a different symbol name to STL
-// containers in order to avoid ODR violations.
-template<typename T>
-class fuzzer_allocator: public std::allocator<T> {};
-
-template<typename T>
-using vector = std::vector<T, fuzzer_allocator<T>>;
-
-template<typename T>
-using set = std::set<T, std::less<T>, fuzzer_allocator<T>>;
-
-typedef fuzzer::vector<uint8_t> Unit;
-typedef fuzzer::vector<Unit> UnitVector;
+typedef std::vector<uint8_t> Unit;
+typedef std::vector<Unit> UnitVector;
typedef int (*UserCallback)(const uint8_t *Data, size_t Size);
int FuzzerDriver(int *argc, char ***argv, UserCallback Callback);
OpenPOWER on IntegriCloud