| 256 | |
| 257 | |
| 258 | bool FuzzApp::Compile() |
| 259 | { |
| 260 | BfCompiler_ClearBuildCache(mCompiler); |
| 261 | |
| 262 | if (!BfCompiler_Compile(mCompiler, mPassInstance, mBuildDir.c_str())) |
| 263 | return false; |
| 264 | |
| 265 | if (!mCEDest.IsEmpty()) |
| 266 | { |
| 267 | String ext; |
| 268 | String srcResult = mBuildDir + "/BeefProject/BeefProject"; |
| 269 | srcResult += BF_OBJ_EXT; |
| 270 | |
| 271 | if (!CopyFile(srcResult, mCEDest)) |
| 272 | return false; |
| 273 | } |
| 274 | |
| 275 | while (true) |
| 276 | { |
| 277 | const char* msg = BfPassInstance_PopOutString(mPassInstance); |
| 278 | if (msg == NULL) |
| 279 | break; |
| 280 | |
| 281 | if ((strncmp(msg, ":error ", 7) == 0) || |
| 282 | (strncmp(msg, "ERROR(", 6) == 0) || |
| 283 | (strncmp(msg, "ERROR:", 6) == 0)) |
| 284 | { |
| 285 | return false; |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | return true; |
| 290 | } |
| 291 | |
| 292 | void FuzzApp::ReleaseCompiler() |
| 293 | { |
nothing calls this directly
no test coverage detected