Author: Fangrui Song Date: 2020-05-31T17:15:14-07:00 New Revision: 92448fd23daf966fe368eb8523d9c5a31797d5d8
URL: https://github.com/llvm/llvm-project/commit/92448fd23daf966fe368eb8523d9c5a31797d5d8 DIFF: https://github.com/llvm/llvm-project/commit/92448fd23daf966fe368eb8523d9c5a31797d5d8.diff LOG: [Driver] Simplify Linux::addProfileRTLibs Added: Modified: clang/lib/Driver/ToolChains/Linux.cpp Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp index 99c23e71eb0c..8188c972f446 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits