Skip to content

Commit

Permalink
Fix misplaced assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Time0o committed Dec 27, 2021
1 parent a1437ec commit 0c1a7d3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fire-llvm/plugin/compile.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <cassert>
#include <memory>
#include <string>

Expand All @@ -22,8 +23,11 @@ inline void compile(clang::CompilerInstance *CI,
// create new compiler instance
auto CInvNew { std::make_shared<clang::CompilerInvocation>() };

assert(clang::CompilerInvocation::CreateFromArgs(
*CInvNew, CodeGenOpts.CommandLineArgs, Diagnostics));
bool CInvNewCreated {
clang::CompilerInvocation::CreateFromArgs(
*CInvNew, CodeGenOpts.CommandLineArgs, Diagnostics) };

assert(CInvNewCreated);

clang::CompilerInstance CINew;
CINew.setInvocation(CInvNew);
Expand Down

0 comments on commit 0c1a7d3

Please sign in to comment.