1 //===--- llvm-demangle-fuzzer.cpp - Fuzzer for the Itanium Demangler ------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Demangle/Demangle.h"
16 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data
, size_t Size
) {
17 std::string
NullTerminatedString((const char *)Data
, Size
);
19 if (char *demangle
= llvm::itaniumDemangle(NullTerminatedString
.c_str(), nullptr,