Commit Graph

9 Commits

Author SHA1 Message Date
Pietro Fezzardi 6b2b2e8ada Make model::Type::edges() method const 2022-04-08 18:58:58 +02:00
Pietro Fezzardi 63a6676551 Make EnumType.UnderlyingType a QualifiedType
This was one of the few places left in the type system where a
`model::Type` referred to another one not using QualifiedType, but a
naked `TupleTreeReference`.

Switching it to be a `model::QualifiedType` makes cross-references
between `model::Type`s more homogenenous, requiring less corner-cases
to handle for whoever manipulates types.
2022-04-08 18:58:58 +02:00
Alessandro Di Federico af1828e090 DwarfImporter: better support for 0-sized types
We now ignore field of `struct`/`union` that have a 0-sized type.
We now also ignore types containing a an array with 0-sized elements.
2022-03-28 12:17:05 +02:00
Alessandro Di Federico 2b55d1df22 Adopt cmake-format 2022-03-17 18:52:18 +01:00
Pietro Fezzardi 0158354dc7 DwarfImporter: fix order of Qualifiers
Before this commit the DwarfImporter was importing qualifiers in
reverse order.

As an example the following declaration in C:

  int *x[4];

was imported as a pointer to array, instead of an array of pointers.

This commit fixes the order of the qualifiers.
2022-03-17 17:02:48 +01:00
Alessandro Di Federico ea6383c476 mv {d,registerD}efaultFunctionPrototype 2022-03-17 14:10:50 +01:00
Alessandro Di Federico 0793e4afcb Turn lifting into a pass 2022-03-11 15:37:12 +01:00
Alessandro Di Federico ee0b8f44c1 Introduce BinaryImporter
This is a big step to split revng-lift in two parts: one that only
writes the model and one that actually lifts to LLVM IR.

* Introduce `revng import binary`
* Split off `BinaryFile.h`
* Drop `revng.h`
* `GeneratedCodeBasicInfo`: use model
* Reduce role of `GeneratedCodeBasicInfo` in favor of
  `model::Architecture` and `model::Register` methods
* `CodeGenerator`: adopt `RawBinaryView` and model
* `JumpTargetManager`: adopt `RawBinaryView` and model
* `ExternalJumpsHandler`: adopt model
* `InstructionTranslator`: discard `Architecture` in favor of
  `EndianessMismatch`
* Many other changes
2022-03-08 15:15:24 +01:00
Alessandro Di Federico 39ace7dc56 mv revng{DwarfImporter,ModelImporterDwarf} 2022-03-08 12:25:47 +01:00