@@ -269,6 +269,9 @@ MCPlusBuilder *createMCPlusBuilder(const Triple::ArchType Arch,
269269 const MCInstrInfo *Info,
270270 const MCRegisterInfo *RegInfo,
271271 const MCSubtargetInfo *STI) {
272+ opts::populateFunctionNames (opts::AssumeNoReturnFunctionsFile,
273+ opts::AssumeNoReturnFunctions);
274+
272275#ifdef X86_AVAILABLE
273276 if (Arch == Triple::x86_64)
274277 return createX86MCPlusBuilder (Analysis, Info, RegInfo, STI);
@@ -2929,18 +2932,12 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
29292932
29302933void RewriteInstance::selectFunctionsToProcess () {
29312934 // Extend the list of functions to process or skip from a file.
2932- auto populateFunctionNames = [](cl::opt<std::string> &FunctionNamesFile,
2933- cl::list<std::string> &FunctionNames) {
2934- if (FunctionNamesFile.empty ())
2935- return ;
2936- std::ifstream FuncsFile (FunctionNamesFile, std::ios::in);
2937- std::string FuncName;
2938- while (std::getline (FuncsFile, FuncName))
2939- FunctionNames.push_back (FuncName);
2940- };
2941- populateFunctionNames (opts::FunctionNamesFile, opts::ForceFunctionNames);
2942- populateFunctionNames (opts::SkipFunctionNamesFile, opts::SkipFunctionNames);
2943- populateFunctionNames (opts::FunctionNamesFileNR, opts::ForceFunctionNamesNR);
2935+ opts::populateFunctionNames (opts::FunctionNamesFile,
2936+ opts::ForceFunctionNames);
2937+ opts::populateFunctionNames (opts::SkipFunctionNamesFile,
2938+ opts::SkipFunctionNames);
2939+ opts::populateFunctionNames (opts::FunctionNamesFileNR,
2940+ opts::ForceFunctionNamesNR);
29442941
29452942 // Make a set of functions to process to speed up lookups.
29462943 std::unordered_set<std::string> ForceFunctionsNR (
0 commit comments