diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index e34a5be8b3..7123b7b7fd 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -13,6 +13,7 @@ #include #include #include +#include #include "absl/algorithm/container.h" #include "absl/strings/match.h" diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 29fdf3a797..d7863d7424 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -42,8 +43,11 @@ #include "pc/peer_connection_message_handler.h" #include "pc/rtp_data_channel.h" #include "pc/rtp_media_utils.h" +#include "pc/rtp_sender.h" #include "pc/rtp_transport_internal.h" +#include "pc/sctp_transport.h" #include "pc/simulcast_description.h" +#include "pc/stats_collector.h" #include "pc/usage_pattern.h" #include "rtc_base/bind.h" #include "rtc_base/helpers.h" diff --git a/tools_webrtc/iwyu/apply-iwyu b/tools_webrtc/iwyu/apply-iwyu index a043493ad1..65950d307f 100755 --- a/tools_webrtc/iwyu/apply-iwyu +++ b/tools_webrtc/iwyu/apply-iwyu @@ -11,6 +11,9 @@ set -e set -x FILE=$1 +# If you want to exclude files that are in $FILE.h from $FILE.cc, set +# the following variable to "yes". This is a style guide violation. +REMOVE_CC_INCLUDES=no if [ ! -f $FILE.h ]; then echo "$FILE.h not found" @@ -22,11 +25,16 @@ if [ ! -f $FILE.cc ]; then exit 1 fi -iwyu -Xiwyu --no_fwd_decls --no-default-mappings -D__X86_64__ -DWEBRTC_POSIX -I . -I third_party/abseil-cpp $FILE.cc |& fix_include || echo "Some files modified" +iwyu -Xiwyu --no_fwd_decls -D__X86_64__ -DWEBRTC_POSIX -I . -I third_party/abseil-cpp $FILE.cc |& fix_include || echo "Some files modified" -grep ^#include $FILE.h | grep -v -f - $FILE.cc > $FILE.ccnew -grep -v -f tools_webrtc/iwyu/iwyu-filter-list $FILE.ccnew > $FILE.cc -rm $FILE.ccnew +if [ $REMOVE_CC_INCLUDES == "yes" ]; then + grep ^#include $FILE.h | grep -v -f - $FILE.cc > $FILE.ccnew + grep -v -f tools_webrtc/iwyu/iwyu-filter-list $FILE.ccnew > $FILE.cc + rm $FILE.ccnew +else + grep -v -f tools_webrtc/iwyu/iwyu-filter-list $FILE.cc > $FILE.ccnew + mv $FILE.ccnew $FILE.cc +fi grep -v -f tools_webrtc/iwyu/iwyu-filter-list $FILE.h > $FILE.hnew mv $FILE.hnew $FILE.h