Explicit representation of ASTs for all the functions in a compile unit.

Added AST and Function classes.
Now, we parse the whole file and build up the AST for all of the
  functions in the Module before we emit IR for the functions (vs. before,
  when we generated IR along the way as we parsed the source file.)
This commit is contained in:
Matt Pharr
2011-10-06 15:18:42 -07:00
parent ec5e627e56
commit f9c67ff806
15 changed files with 935 additions and 613 deletions

View File

@@ -40,10 +40,11 @@
#define ISPC_MODULE_H 1
#include "ispc.h"
#include "ast.h"
namespace llvm
{
class raw_string_ostream;
class raw_string_ostream;
}
class Module {
@@ -120,10 +121,9 @@ public:
/** The diBuilder manages generating debugging information */
llvm::DIBuilder *diBuilder;
GatherBuffer *gatherBuffer;
private:
const char *filename;
AST *ast;
/** Write the corresponding output type to the given file. Returns
true on success, false if there has been an error. The given