Skip to content

Commit

Permalink
[HERO/Clang] Print messages if HERCULES PREM passes are active
Browse files Browse the repository at this point in the history
Console messages that indicate when HERCULES PREM passes are active and
when not are useful.  However, previously messages were always printed
if HERCULES PREM passes were *not* active, which confuses users that do
not want to use or do not know HERCULES PREM passes.  Additionally,
these messages break those upstream regression tests that match on
console output.

This commit changes the messages to be printed when HERCULES PREM passes
are active instead of when they are not active.
  • Loading branch information
andreaskurth committed Jan 3, 2022
1 parent bc1e8e9 commit f989123
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4235,13 +4235,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(herculesPassRoot +
"libChannelArgInsertion.so"));

} else {
llvm::errs() << llvm::sys::path::filename(Input.getBaseInput())
<< " (" << getToolChain().getArchName() << "): ";
llvm::errs().changeColor(llvm::raw_fd_ostream::Colors::BLUE, true);
llvm::errs() << "HERCULES PREM Passes not applied. ";
llvm::errs() << "Applying HERCULES PREM Passes installed at '";
llvm::errs() << herculesInstallPathEnv;
llvm::errs().resetColor();
llvm::errs() << "Set the HERCULES_INSTALL env if you want to enable PREM.\n";
llvm::errs() << "'\n";
}

if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm ||
Expand Down

0 comments on commit f989123

Please sign in to comment.