function sharedSrcFiles = getSharedSrcFiles(buildInfo, lOriginalBuildFolder, lInstrPartOfPath)
% Return an array of shared source files that must be instrumented; includes source files in the
% main shared utilities folder as well as reusable library source files.
    
%   Copyright 2009-2019 The MathWorks, Inc.

buildInfos = coder.coverage.getSharedBuildInfos...
    (buildInfo, lOriginalBuildFolder, lInstrPartOfPath);
    
sharedSrcFiles = {};
for i=1:length(buildInfos)
    % Get source files from the shared buildInfo: resulting
    % files include a path relative to the buildInfo location
    sharedSrcFiles = ...
        [sharedSrcFiles ...
         getSourceFiles(buildInfos(i), true, true)]; %#ok<AGROW>
end

