2003-09-19 00:17:06 +08:00
|
|
|
//===-- ModuleProvider.cpp - Base implementation for module providers -----===//
|
2005-04-22 07:48:37 +08:00
|
|
|
//
|
2003-10-21 03:43:21 +08:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-22 07:48:37 +08:00
|
|
|
//
|
2003-10-21 03:43:21 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
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
|
|
|
}
|