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/Compiler.h b/lib/ExecutionEngine/Compiler.h
index 863cda6..8fee17c 100644
--- a/lib/ExecutionEngine/Compiler.h
+++ b/lib/ExecutionEngine/Compiler.h
@@ -93,8 +93,6 @@
llvm::Module *mModule;
- bool mHasLinked;
-
public:
Compiler(ScriptCompiled *result);
@@ -119,12 +117,7 @@
return mEmittedELFExecutable;
}
- int readModule(llvm::Module *module) {
- mModule = module;
- return hasError();
- }
-
- int linkModule(llvm::Module *module);
+ int readModule(llvm::Module &pModule);
int compile(const CompilerOption &option);