[Driver] Simplify Linux::addProfileRTLibs

This commit is contained in:
Fangrui Song 2020-05-31 17:15:14 -07:00
parent 77e1181df4
commit 92448fd23d
1 changed files with 1 additions and 5 deletions

View File

@ -867,13 +867,9 @@ SanitizerMask Linux::getSupportedSanitizers() const {
void Linux::addProfileRTLibs(const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs) const {
bool Profile = needsProfileRT(Args);
if (!Profile && !needsGCovInstrumentation(Args))
return;
// Add linker option -u__llvm_profile_runtime to cause runtime
// initialization module to be linked in.
if (Profile)
if (needsProfileRT(Args))
CmdArgs.push_back(Args.MakeArgString(
Twine("-u", llvm::getInstrProfRuntimeHookVarName())));
ToolChain::addProfileRTLibs(Args, CmdArgs);