NPR has a piece titled How Much Longer Can Photographic Film Hold On?:
At the turn of the 21st century, American shutterbugs were buying close to a billion rolls of film per year. This year, they might buy a mere 20 million, plus 31 million single-use cameras — the beach-resort staple vacationers turn to in a pinch, according to the Photo Marketing Association
Basically, film is not dead, but it is far beyond in term of market. The biggest risk for film is not that big companies stop producing it but rather that they hoard the technology to make it. Agfa Scala was the first example, albeit salvaged by the makers of DR5, still repeating the mistake. Polaroid is the second example, and the Impossible Project did the impossible with it. Kodachrome is the third and hardest example: a very complicated and undocumented process without any alternative. I believe slide film E-6 will be next. Time will tell.