Skip to content

Commit

Permalink
Use normal inlining in clang loader
Browse files Browse the repository at this point in the history
  • Loading branch information
shodoco committed Apr 19, 2017
1 parent 8276938 commit b1df21d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cc/frontends/clang/loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, TableStorage &ts, const st
invocation2.getFrontendOpts().Inputs.push_back(
FrontendInputFile(main_path, IK_C));
invocation2.getFrontendOpts().DisableFree = false;
// Resort to normal inlining. In -O0 the default is OnlyAlwaysInlining and
// clang might add noinline attribute even for functions with inline hint.
invocation2.getCodeGenOpts().setInlining(CodeGenOptions::NormalInlining);
// suppress warnings in the 2nd pass, but bail out on errors (our fault)
invocation2.getDiagnosticOpts().IgnoreWarnings = true;
compiler2.createDiagnostics();
Expand Down

0 comments on commit b1df21d

Please sign in to comment.