Skip to content

Commit

Permalink
Improve jitmap-ir ergonomics
Browse files Browse the repository at this point in the history
  • Loading branch information
fsaintjacques committed Jan 28, 2020
1 parent 701a32a commit b571381
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/jitmap/query/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ class JitEngineImpl {
auto module_ctx = ExpressionCodeGen("jitmap_ir").Compile(n, e).Finish();
auto module = std::move(module_ctx.first);

// By default, the TargetTriple is not part of the module. This ensure that
// callers of `jitmap-ir` don't need to explicit the tripple in the command
// line chain, e.g. via `opt` or `llc` utility.
module->setTargetTriple(GetTargetTriple());

std::string ir;
llvm::raw_string_ostream ss{ir};
module->print(ss, nullptr);
Expand Down

0 comments on commit b571381

Please sign in to comment.