blob: c9e4d87afe529505d52e19706625e2163e5e1214 [file] [log] [blame]
Misha Brukman521f1fe2003-09-18 16:17:06 +00001//===-- ModuleProvider.cpp - Base implementation for module providers -----===//
Misha Brukmanfd939082005-04-21 23:48:37 +00002//
John Criswellb576c942003-10-20 19:43:21 +00003// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
Misha Brukmanfd939082005-04-21 23:48:37 +00007//
John Criswellb576c942003-10-20 19:43:21 +00008//===----------------------------------------------------------------------===//
Misha Brukman521f1fe2003-09-18 16:17:06 +00009//
10// Minimal implementation of the abstract interface for providing a module.
11//
12//===----------------------------------------------------------------------===//
13
14#include "llvm/ModuleProvider.h"
15#include "llvm/Module.h"
Chris Lattner31f84992003-11-21 20:23:48 +000016using namespace llvm;
Brian Gaeked0fde302003-11-11 22:41:34 +000017
Misha Brukman521f1fe2003-09-18 16:17:06 +000018/// ctor - always have a valid Module
19///
Chris Lattner00413e32003-10-04 20:14:59 +000020ModuleProvider::ModuleProvider() : TheModule(0) { }
Misha Brukman521f1fe2003-09-18 16:17:06 +000021
22/// dtor - when we leave, we take our Module with us
23///
Chris Lattner00413e32003-10-04 20:14:59 +000024ModuleProvider::~ModuleProvider() {
Misha Brukman238fb252003-09-22 23:44:13 +000025 delete TheModule;
Misha Brukman521f1fe2003-09-18 16:17:06 +000026}