Skip to content

Commit efe5997

Browse files
committed
[Tools] Fix swift-reflection-fuzzer.
A couple of things that swift-reflection-fuzzer uses have been updated without updating swift-reflection-fuzzer, the upshot being that it now won't build (which also blocks use of swift-demangle-fuzzer). rdar://94143566
1 parent a6ffb09 commit efe5997

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/swift-reflection-fuzzer/swift-reflection-fuzzer.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <cstddef>
3232
#include <cstdint>
3333
#include <cstdio>
34+
#include <iostream>
3435

3536
#if defined(__APPLE__) && defined(__MACH__)
3637
#include <TargetConditionals.h>
@@ -43,7 +44,7 @@ using namespace swift::reflection;
4344
using namespace swift::remote;
4445

4546
using NativeReflectionContext = swift::reflection::ReflectionContext<
46-
External<RuntimeTarget<sizeof(uintptr_t)>>>;
47+
External<WithObjCInterop<RuntimeTarget<sizeof(uintptr_t)>>>>;
4748

4849
template <typename T> static T unwrap(llvm::Expected<T> value) {
4950
if (value)
@@ -142,6 +143,6 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
142143
auto reader = std::make_shared<ObjectMemoryReader>();
143144
NativeReflectionContext context(std::move(reader));
144145
context.addImage(RemoteAddress(Data));
145-
context.getBuilder().dumpAllSections(stdout);
146+
context.getBuilder().dumpAllSections<WithObjCInterop, sizeof(uintptr_t)>(std::cout);
146147
return 0; // Non-zero return values are reserved for future use.
147148
}

0 commit comments

Comments
 (0)