mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 20:52:14 +00:00

The getopt library has a structure called option (lowercase). We have a structure called Option (uppercase). previously the two structures had exactly the same definitions, and we were doing a C-style cast of an Option* to an option*. C-style casts don't bother to warn you when you cast to unrelated types, but in the original OptionValidator patch I modified the definition of Option. This patch fixes the errors by building an array of option structures and filling it out the correct way before passing it to the getopt library. This also fixes one other source of test failures: an uninitialized read that occurs due to not initializing a field of the OptionDefinition. Reviewed By: Todd Fiala Differential Revision: http://reviews.llvm.org/D4425 llvm-svn: 212628
Description
llvm with tablegen backend for capstone disassembler
Languages
LLVM
34.8%
C++
32.7%
C
19.6%
Assembly
8.6%
MLIR
1.2%
Other
2.7%