diff options
author | Mikhail R. Gadelha <mikhail.ramalho@gmail.com> | 2018-07-25 12:49:11 +0000 |
---|---|---|
committer | Mikhail R. Gadelha <mikhail.ramalho@gmail.com> | 2018-07-25 12:49:11 +0000 |
commit | 19f0761020822f8916726af0149924cb3525f71c (patch) | |
tree | 244b54885dd2907cfaa8c53da377fe7d003f24e4 /llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp | |
parent | 0b2aa685a623986d5efcf690136f09f294fb937a (diff) | |
download | llvm-19f0761020822f8916726af0149924cb3525f71c.zip llvm-19f0761020822f8916726af0149924cb3525f71c.tar.gz llvm-19f0761020822f8916726af0149924cb3525f71c.tar.bz2 |
[analyzer] Moved static Context to class member
Summary:
Although it is a big patch, the changes are simple:
1. There is one `Z3_Context` now, member of the `SMTConstraintManager` class.
2. `Z3Expr`, `Z3Sort`, `Z3Model` and `Z3Solver` are constructed with a reference to the `Z3_Context` in `SMTConstraintManager`.
3. All static functions are now members of `Z3Solver`, e.g, the `SMTConstraintManager` now calls `Solver.fromBoolean(false)` instead of `Z3Expr::fromBoolean(false)`.
Most of the patch only move stuff around except:
1. New method `Z3Sort MkSort(const QualType &Ty, unsigned BitWidth)`, that creates a sort based on the `QualType` and its width. Used to simplify the `fromData` method.
Unfortunate consequence of this patch:
1. `getInterpretation` was moved from `Z3Model` class to `Z3Solver`, because it needs to create a `Z3Sort` before returning the interpretation. This can be fixed by changing both `toAPFloat` and `toAPSInt` by removing the dependency of `Z3Sort` (it's only used to check which Sort was created and to retrieve the type width).
Reviewers: NoQ, george.karpenkov, ddcc
Reviewed By: george.karpenkov
Subscribers: xazax.hun, szepet, a.sidorin
Differential Revision: https://reviews.llvm.org/D49236
llvm-svn: 337915
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp')
0 files changed, 0 insertions, 0 deletions