Commit Graph

860 Commits

Author SHA1 Message Date
Alessandro Di Federico 076aeac7f3 Move and rename all files
This commit moves around most files. The new directory structure is as
follows:

* `lib/$LIBRARY/`: contains a library, i.e., a set of `.cpp` files used
  by multiple libraries/tools.
* `include/revng/$LIBRARY/`: contains the public headers associated to
  the library in `lib/$LIBRARY/`.
* `tools/$TOOL/`: directory where all the `.cpp` files (and private
  headers) for a tool reside. Currently we have two tools: `revamb` and
  `revamb-dump`.

On top of this, all file names are now in camel case.
2018-10-03 23:11:12 +02:00
Alessandro Di Federico fea049ad95 Drop some unused variables 2018-09-29 16:50:36 +02:00
Alessandro Di Federico f819962527 Switch to new assertion system globally
This commit enforces on the whole project the usage of our own assertion
system. This means all calls to `abort`, `assert` and `llvm_unreachable`
have been replaced with calls to `revng_abort`, `revng_assert` and
`revng_unreachable`, respectively.

The error messages, usually expressed as `assert(Condition &&
"Message")` have now been replaced using the second (optional) argument
of `revng_assert`.

Additionally, all the `assert(false)` statements have been replaced with
calls to `revng_abort`. Apart from readibility, this ensures the
compilers is aware of the fact that call will never return.

This change will enable us to drop many statements whose sole purpose
was marking a variable employed in an assertion as used in release
mode. In fact, with the new assertion system this is no longer
necessary.
2018-09-29 13:05:16 +02:00
Alessandro Di Federico e053b215d8 Drop _ prefix in include guards
We used to have a `_` prefix for include guards macros, however,
according to the standard, macros starting with an underscore are
reserved. This commit drops them all.
2018-09-26 08:59:59 +02:00
Alessandro Di Federico 047ae0d4d8 Apply clang-format globally
This commit applies our `clang-format` rules globally. From now on, all
commits should respect our configuration file.

Pretty large change.
2018-09-21 20:08:45 +02:00
Alessandro Di Federico d57b8b3ab4 Various minor whitespace/case changes 2018-09-21 20:08:23 +02:00
Alessandro Di Federico 384c317ef1 Introduce using to increase readibility
This commit introduces `using` statements and `constexpr` functions to
increase readibility of various types.
2018-09-21 20:05:18 +02:00
Alessandro Di Federico 34d216eb0a Create temporary variables to increase readibility 2018-09-21 20:05:18 +02:00
Alessandro Di Federico 6cfabd96f8 Prevent committing WIP code
This commit introduces a check in `check-conventions.sh` to prevent
committing code denoted by a `// WIP` comment, that are supposed to be
used to remind the developer something has to be changed before
submitting a pull request.
2018-09-21 20:03:21 +02:00
Alessandro Di Federico 7fe00c08dd Rewrite the stack and introduce the ABI analyses
This is a very large commit importing the reviewed (and heavily
simplified) stack analysis and the new ABI analysis, which provides
information on the calling convention of each function and so on.

For an overview of the new analyses please consult OVERVIEW.md.
2018-09-18 15:58:20 +02:00