Added passing "ASTContext" to both GREngine and GRConstants.
Added initial support for integer casting operations to GRConstants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 5a5a039..30c717f 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -567,16 +567,17 @@
namespace {
class GRConstantsVisitor : public CFGVisitor {
+ ASTContext* Ctx;
public:
- virtual void Initialize(ASTContext &Context) {}
+ virtual void Initialize(ASTContext &Context) { Ctx = &Context; }
virtual void VisitCFG(CFG& C) {
- RunGRConstants(C);
+ RunGRConstants(C, *Ctx);
}
};
} // end anonymous namespace
-ASTConsumer *clang::CreateGRConstants() {
+ASTConsumer* clang::CreateGRConstants() {
return new GRConstantsVisitor();
}