mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[llvm-mc-assemble-fuzzer] Initialize MCTargetOptions.
When run the command in the llvm-mc-assemble-fuzzer document, ``` llvm-mc-fuzzer --triple=aarch64-linux-gnu --fuzzer-args -max_len=4 ``` it triggers the following assertion: ``` llvm-mc-assemble-fuzzer: llvm-project/llvm/lib/MC/MCTargetOptionsCommandFlags.cpp:38: bool llvm::mc::getRelaxAll(): Assertion `RelaxAllView && "RegisterMCTargetOptionsFlags not created."' failed. ``` It is caused by no global RegisterMCTargetOptionsFlags object to initialize the MC target options. Differential Revision: https://reviews.llvm.org/D106417
This commit is contained in:
parent
f303e248b9
commit
c6d5dd6f53
@ -37,6 +37,8 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static mc::RegisterMCTargetOptionsFlags MOF;
|
||||
|
||||
static cl::opt<std::string>
|
||||
TripleName("triple", cl::desc("Target triple to assemble for, "
|
||||
"see -version for available targets"));
|
||||
|
Loading…
Reference in New Issue
Block a user