mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-29 11:17:28 +00:00
Fix linker error in clang-fuzzer following 89ea0b0520
.
This fixes: tools/clang/tools/clang-fuzzer/handle-cxx/CMakeFiles/obj.clangHandleCXX.dir/handle_cxx.cpp.o:handle_cxx.cpp:function clang_fuzzer::HandleCXX(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, std::vector<char const*, std::allocator<char const*> > const&): error: undefined reference to 'clang::tooling::newInvocation(clang::DiagnosticsEngine*, llvm::SmallVector<char const*, 16u> const&)'
This commit is contained in:
parent
8374bf4363
commit
cab3fc53d2
@ -505,7 +505,8 @@ void addTargetAndModeForProgramName(std::vector<std::string> &CommandLine,
|
||||
|
||||
/// Creates a \c CompilerInvocation.
|
||||
CompilerInvocation *newInvocation(DiagnosticsEngine *Diagnostics,
|
||||
const llvm::opt::ArgStringList &CC1Args);
|
||||
const llvm::opt::ArgStringList &CC1Args,
|
||||
const char *const BinaryName);
|
||||
|
||||
} // namespace tooling
|
||||
|
||||
|
@ -37,7 +37,7 @@ void clang_fuzzer::HandleCXX(const std::string &S,
|
||||
IntrusiveRefCntPtr<clang::DiagnosticIDs>(new DiagnosticIDs()), &*DiagOpts,
|
||||
&Diags, false);
|
||||
std::unique_ptr<clang::CompilerInvocation> Invocation(
|
||||
tooling::newInvocation(&Diagnostics, CC1Args));
|
||||
tooling::newInvocation(&Diagnostics, CC1Args, /*BinaryName=*/nullptr));
|
||||
std::unique_ptr<llvm::MemoryBuffer> Input =
|
||||
llvm::MemoryBuffer::getMemBuffer(S);
|
||||
Invocation->getPreprocessorOpts().addRemappedFile(FileName,
|
||||
|
Loading…
Reference in New Issue
Block a user