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