Initial framework for generating Axle metadata. This currently only supports the function level metadata. Argument and result metadata to come later

Swift SVN r9061
This commit is contained in:
Pete Cooper
2013-10-09 16:54:28 +00:00
parent b4d196eeb9
commit f9c6bf0630
7 changed files with 170 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#include "llvm/ADT/PointerUnion.h"
#include "llvm/Support/ErrorHandling.h"
#include "GenAxleMeta.h"
#include "GenType.h"
#include "IRGenModule.h"
#include "IRGenDebugInfo.h"
@@ -65,8 +66,9 @@ IRGenModule::IRGenModule(ASTContext &Context,
: Context(Context), Opts(Opts), Module(Module),
LLVMContext(Module.getContext()), DataLayout(DataLayout),
SILMod(SILMod), TargetInfo(SwiftTargetInfo::get(*this)),
DebugInfo(0), Types(*new TypeConverter(*this))
DebugInfo(0), AxleMeta(0), Types(*new TypeConverter(*this))
{
VoidTy = llvm::Type::getVoidTy(getLLVMContext());
Int1Ty = llvm::Type::getInt1Ty(getLLVMContext());
Int8Ty = llvm::Type::getInt8Ty(getLLVMContext());
@@ -186,6 +188,8 @@ IRGenModule::IRGenModule(ASTContext &Context,
DebugInfo = new IRGenDebugInfo(Opts, CI->getTargetInfo(), Types,
Context, Module);
}
if (Context.LangOpts.Axle)
AxleMeta = new axle::GenAxleMeta(Module);
}
IRGenModule::~IRGenModule() {