2003-09-18 18:17:06 +02:00
|
|
|
//===-- ModuleProvider.cpp - Base implementation for module providers -----===//
|
2005-04-22 01:48:37 +02:00
|
|
|
//
|
2003-10-20 21:43:21 +02:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-22 01:48:37 +02:00
|
|
|
//
|
2003-10-20 21:43:21 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
2003-09-18 18:17:06 +02:00
|
|
|
//
|
|
|
|
// Minimal implementation of the abstract interface for providing a module.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/ModuleProvider.h"
|
|
|
|
#include "llvm/Module.h"
|
2003-11-21 21:23:48 +01:00
|
|
|
using namespace llvm;
|
2003-11-11 23:41:34 +01:00
|
|
|
|
2003-09-18 18:17:06 +02:00
|
|
|
/// ctor - always have a valid Module
|
|
|
|
///
|
2003-10-04 22:14:59 +02:00
|
|
|
ModuleProvider::ModuleProvider() : TheModule(0) { }
|
2003-09-18 18:17:06 +02:00
|
|
|
|
|
|
|
/// dtor - when we leave, we take our Module with us
|
|
|
|
///
|
2003-10-04 22:14:59 +02:00
|
|
|
ModuleProvider::~ModuleProvider() {
|
2003-09-23 01:44:13 +02:00
|
|
|
delete TheModule;
|
2003-09-18 18:17:06 +02:00
|
|
|
}
|