Rename IRGenModuleDispatcher to just IRGenerator and transfer

ownership of some of the basic structures to it.
This commit is contained in:
John McCall
2016-04-27 09:41:05 -07:00
parent 010cd2684a
commit 6c92c324f6
24 changed files with 307 additions and 259 deletions

View File

@@ -51,9 +51,9 @@ IRGenFunction::IRGenFunction(IRGenModule &IGM,
// Apply sanitizer attributes to the function.
// TODO: Check if the function is ASan black listed either in the external
// file or via annotations.
if (IGM.Opts.Sanitize == SanitizerKind::Address)
if (IGM.IRGen.Opts.Sanitize == SanitizerKind::Address)
Fn->addFnAttr(llvm::Attribute::SanitizeAddress);
if (IGM.Opts.Sanitize == SanitizerKind::Thread)
if (IGM.IRGen.Opts.Sanitize == SanitizerKind::Thread)
Fn->addFnAttr(llvm::Attribute::SanitizeThread);
emitPrologue();
@@ -69,6 +69,18 @@ IRGenFunction::~IRGenFunction() {
if (LocalTypeData) destroyLocalTypeData();
}
ModuleDecl *IRGenFunction::getSwiftModule() const {
return IGM.getSwiftModule();
}
SILModule &IRGenFunction::getSILModule() const {
return IGM.getSILModule();
}
Lowering::TypeConverter &IRGenFunction::getSILTypes() const {
return IGM.getSILTypes();
}
/// Call the llvm.memcpy intrinsic. The arguments need not already
/// be of i8* type.
void IRGenFunction::emitMemCpy(llvm::Value *dest, llvm::Value *src,