2003-09-18 16:17:06 +00:00
|
|
|
//===-- ModuleProvider.cpp - Base implementation for module providers -----===//
|
2003-10-20 19:43:21 +00: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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2003-09-18 16:17:06 +00:00
|
|
|
//
|
|
|
|
// Minimal implementation of the abstract interface for providing a module.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/ModuleProvider.h"
|
|
|
|
#include "llvm/Module.h"
|
2003-11-21 20:23:48 +00:00
|
|
|
using namespace llvm;
|
2003-11-11 22:41:34 +00:00
|
|
|
|
2003-09-18 16:17:06 +00:00
|
|
|
/// ctor - always have a valid Module
|
|
|
|
///
|
2003-10-04 20:14:59 +00:00
|
|
|
ModuleProvider::ModuleProvider() : TheModule(0) { }
|
2003-09-18 16:17:06 +00:00
|
|
|
|
|
|
|
/// dtor - when we leave, we take our Module with us
|
|
|
|
///
|
2003-10-04 20:14:59 +00:00
|
|
|
ModuleProvider::~ModuleProvider() {
|
2003-09-22 23:44:13 +00:00
|
|
|
delete TheModule;
|
2003-09-18 16:17:06 +00:00
|
|
|
}
|