1 #include "automemcpy/CodeGen.h"
2 #include "automemcpy/RandomFunctionGenerator.h"
4 #include <unordered_set>
9 std::vector
<FunctionDescriptor
> generateFunctionDescriptors() {
10 std::unordered_set
<FunctionDescriptor
, FunctionDescriptor::Hasher
> Seen
;
11 std::vector
<FunctionDescriptor
> FunctionDescriptors
;
12 RandomFunctionGenerator P
;
13 while (std::optional
<FunctionDescriptor
> MaybeFD
= P
.next()) {
14 FunctionDescriptor FD
= *MaybeFD
;
15 if (Seen
.count(FD
)) // FIXME: Z3 sometimes returns twice the same object.
18 FunctionDescriptors
.push_back(std::move(FD
));
20 return FunctionDescriptors
;
23 } // namespace automemcpy
26 int main(int, char **) {
27 llvm::automemcpy::Serialize(llvm::outs(),
28 llvm::automemcpy::generateFunctionDescriptors());