[Remarks] Allow the RemarkStreamer to be used directly with a stream
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Wed, 18 Sep 2019 01:04:45 +0000 (01:04 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Wed, 18 Sep 2019 01:04:45 +0000 (01:04 +0000)
commitba2e752c520b4ba31c30846269f8331cc217054f
tree467b44cfa3beb638abbe90bf290ecaa571474ff1
parent5f8a3270ae74d84599dc09c581c2a417d4bbfb5e
[Remarks] Allow the RemarkStreamer to be used directly with a stream

The filename in the RemarkStreamer should be optional to allow clients
to stream remarks to memory or to existing streams.

This introduces a new overload of `setupOptimizationRemarks`, and avoids
enforcing the presence of a filename at different places.

llvm-svn: 372195
llvm/include/llvm/IR/RemarkStreamer.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/IR/RemarkStreamer.cpp