Refactor SourceInfo into Source.
A Script object is associated with a Source object (HAS-A relation.)
A Source object describes the source code (more specifically, the LLVM
module) that is going to be compiled.
BCCContext contains the context used in a Source object.
BCCContext is now managed by the user not the libbcc itself. That is,
user should supply the context object when they create a Source object.
Change-Id: Icb8980d6f15cf30aa0415e69e3ae585d990dc156
diff --git a/lib/ExecutionEngine/BCCContext.h b/lib/ExecutionEngine/BCCContext.h
index 3e58acc..56962fe 100644
--- a/lib/ExecutionEngine/BCCContext.h
+++ b/lib/ExecutionEngine/BCCContext.h
@@ -24,6 +24,7 @@
namespace bcc {
class BCCContextImpl;
+class Source;
/*
* class BCCContext manages the global data across the libbcc infrastructure.
@@ -38,6 +39,9 @@
llvm::LLVMContext &getLLVMContext();
const llvm::LLVMContext &getLLVMContext() const;
+ void addSource(Source &pSource);
+ void removeSource(Source &pSource);
+
// Global BCCContext
static BCCContext *GetOrCreateGlobalContext();
static void DestroyGlobalContext();