Workaround a (Windows) linker bug when doing a PGO build.

It looks like having a function that ends with "FATAL()" but doesn't also have a return value (even if it's useless).

This is causing a hang in link.exe when doing a PGO build (this has been blocking us from doing PGO builds for more than a month now). See https://connect.microsoft.com/VisualStudio/feedback/details/996802/link-exe-hang-during-the-pgo-optimization-step for more details.
BUG=chromium:491914
R=turaj@webrtc.org

Review URL: https://codereview.webrtc.org/1181033009.

Cr-Commit-Position: refs/heads/master@{#9469}
This commit is contained in:
Niklas Enbom 2015-06-19 09:11:05 -07:00
parent 39ffaeac6e
commit 76eea37ed0

View File

@ -272,6 +272,11 @@ int AudioCodingModuleImpl::SendFrequency() const {
// TODO(henrik.lundin): Remove; not used.
int AudioCodingModuleImpl::SendBitrate() const {
FATAL() << "Deprecated";
// This return statement is required to workaround a bug in VS2013 Update 4
// when turning on the whole program optimizations. Without hit the linker
// will hang because it doesn't seem to find an exit path for this function.
// This is likely a bug in link.exe and would probably be fixed in VS2015.
return -1;
// CriticalSectionScoped lock(acm_crit_sect_);
//
// if (!codec_manager_.current_encoder()) {