summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBill Wendling <wendling@apple.com>2011-09-05 05:33:21 -0700
committerBill Wendling <wendling@apple.com>2011-09-05 05:33:21 -0700
commita40d451ccbaa38a85d2d2f342d93110bd04c01e5 (patch)
treecbb8c88a990411181f88e8fd1a63ecbe90eb3732 /tools
parent555f81130a0bd7e8e2a4c5e601bec9d6d8ea6ae3 (diff)
downloadflang-a40d451ccbaa38a85d2d2f342d93110bd04c01e5.tar.gz
Move over to the Sema version of actions instead of the ad-hoc version.
Diffstat (limited to 'tools')
-rw-r--r--tools/driver/Main.cpp8
-rw-r--r--tools/driver/Makefile2
2 files changed, 7 insertions, 3 deletions
diff --git a/tools/driver/Main.cpp b/tools/driver/Main.cpp
index a240ccc913..91ff99cc70 100644
--- a/tools/driver/Main.cpp
+++ b/tools/driver/Main.cpp
@@ -11,9 +11,9 @@
//
//===----------------------------------------------------------------------===//
-#include "flang/Basic/Actions.h"
#include "flang/Frontend/TextDiagnosticPrinter.h"
#include "flang/Parse/Parser.h"
+#include "flang/Sema/Sema.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -78,8 +78,12 @@ static bool ParseFile(const std::string &Filename,
Opts.ReturnComments = ReturnComments;
TextDiagnosticPrinter TDP(SrcMgr);
Diagnostic Diag(&SrcMgr, &TDP, false);
+#if 0
PrintAction PA(Diag);
- Parser P(SrcMgr, Opts, Diag, PA);
+#endif
+ ASTContext Context(SrcMgr);
+ Sema SA(Context, Diag);
+ Parser P(SrcMgr, Opts, Diag, SA);
return P.ParseProgramUnits();
}
diff --git a/tools/driver/Makefile b/tools/driver/Makefile
index b2b28bacda..e0e22e0835 100644
--- a/tools/driver/Makefile
+++ b/tools/driver/Makefile
@@ -31,7 +31,7 @@ include $(FLANG_LEVEL)/../../Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
ipo selectiondag
-USEDLIBS = flangAST.a flangFrontend.a flangParse.a flangBasic.a
+USEDLIBS = flangAST.a flangFrontend.a flangParse.a flangSema.a flangBasic.a
include $(FLANG_LEVEL)/Makefile