aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/bruiser.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-12-29 15:49:17 +0000
committerbloodstalker <thabogre@gmail.com>2017-12-29 15:49:17 +0000
commit8fce7a2eae4fc254517f49a9d37f566b85c4e08b (patch)
treebae4bb8c9af1055c6112c382990405c3cb152f31 /bruiser/bruiser.cpp
parentupdated README, added comments (diff)
downloadmutator-8fce7a2eae4fc254517f49a9d37f566b85c4e08b.tar.gz
mutator-8fce7a2eae4fc254517f49a9d37f566b85c4e08b.zip
load.py recognized function entries correctly now. minor fixes and updates.
Diffstat (limited to 'bruiser/bruiser.cpp')
-rw-r--r--bruiser/bruiser.cpp41
1 files changed, 14 insertions, 27 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp
index 46f8323..dff1bb1 100644
--- a/bruiser/bruiser.cpp
+++ b/bruiser/bruiser.cpp
@@ -111,8 +111,7 @@ cl::opt<std::string> NonCLILuaScript("lua", cl::desc("specifies a lua script for
class LuaEngine
{
public:
- LuaEngine()
- {
+ LuaEngine() {
LS = luaL_newstate();
}
@@ -131,62 +130,49 @@ class LuaEngine
#undef OPEN_LUA_LIBS
- void LoadAuxLibs(void)
- {
+ void LoadAuxLibs(void) {
luaL_requiref(LS, "table", luaopen_table, 1);
luaL_requiref(LS, "io", luaopen_io, 1);
luaL_requiref(LS, "string", luaopen_string, 1);
}
- void LoadEverylib(void)
- {
+ void LoadEverylib(void) {
luaL_openlibs(LS);
}
- void RunString(char* __lua_string)
- {
+ void RunString(char* __lua_string) {}
- }
-
- void RunChunk(char* __lua_chunk)
- {
+ void RunChunk(char* __lua_chunk) {
dostring(LS, __lua_chunk, "test");
}
- int RunScript(char* __lua_script)
- {
+ int RunScript(char* __lua_script) {
return luaL_dofile(LS, __lua_script);
}
- void Test(void)
- {
+ void Test(void) {
luaL_dofile(LS, "./lua-scripts/test.lua");
luaL_dofile(LS, "./lua-scripts/test1.lua");
luaL_dofile(LS, "./lua-scripts/test2.lua");
}
- void Test2(void)
- {
+ void Test2(void) {
luaL_dofile(LS, "./lua-scripts/test1.lua");
}
- void Test3(void)
- {
+ void Test3(void) {
luaL_dofile(LS, "./lua-scripts/test2.lua");
}
- void Test4(void)
- {
+ void Test4(void) {
luaL_dofile(LS, "./lua-scripts/test3.lua");
}
- lua_State* GetLuaState(void)
- {
+ lua_State* GetLuaState(void) {
return this->LS;
}
- void Cleanup(void)
- {
+ void Cleanup(void) {
lua_close(LS);
}
@@ -296,6 +282,7 @@ class PyExec {
}
}
hexobj.push_back(tempvec);
+ tempvec.clear();
}
}
}
@@ -1758,7 +1745,7 @@ int main(int argc, const char **argv)
CommonOptionsParser op(argc, argv, BruiserCategory);
ClangTool Tool(op.getCompilations(), op.getSourcePathList());
std::vector<std::unique_ptr<ASTUnit>> ASTs;
- auto buildASTRes = Tool.buildASTs(ASTs);
+ //auto buildASTRes = Tool.buildASTs(ASTs);
CompilationDatabase &CDB = op.getCompilations();
std::vector<CompileCommand> CCV = CDB.getAllCompileCommands();