|
@@ -167,9 +167,9 @@ static cl::opt<RunPassOption, true, cl::parser<std::string>> RunPass(
|
|
|
|
|
|
static int compileModule(char **, LLVMContext &);
|
|
static int compileModule(char **, LLVMContext &);
|
|
|
|
|
|
-static std::unique_ptr<tool_output_file>
|
|
|
|
-GetOutputStream(const char *TargetName, Triple::OSType OS,
|
|
|
|
- const char *ProgName) {
|
|
|
|
|
|
+static std::unique_ptr<ToolOutputFile> GetOutputStream(const char *TargetName,
|
|
|
|
+ Triple::OSType OS,
|
|
|
|
+ const char *ProgName) {
|
|
// If we don't yet have an output filename, make one.
|
|
// If we don't yet have an output filename, make one.
|
|
if (OutputFilename.empty()) {
|
|
if (OutputFilename.empty()) {
|
|
if (InputFilename == "-")
|
|
if (InputFilename == "-")
|
|
@@ -225,8 +225,7 @@ GetOutputStream(const char *TargetName, Triple::OSType OS,
|
|
sys::fs::OpenFlags OpenFlags = sys::fs::F_None;
|
|
sys::fs::OpenFlags OpenFlags = sys::fs::F_None;
|
|
if (!Binary)
|
|
if (!Binary)
|
|
OpenFlags |= sys::fs::F_Text;
|
|
OpenFlags |= sys::fs::F_Text;
|
|
- auto FDOut = llvm::make_unique<tool_output_file>(OutputFilename, EC,
|
|
|
|
- OpenFlags);
|
|
|
|
|
|
+ auto FDOut = llvm::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags);
|
|
if (EC) {
|
|
if (EC) {
|
|
errs() << EC.message() << '\n';
|
|
errs() << EC.message() << '\n';
|
|
return nullptr;
|
|
return nullptr;
|
|
@@ -322,11 +321,11 @@ int main(int argc, char **argv) {
|
|
if (PassRemarksHotnessThreshold)
|
|
if (PassRemarksHotnessThreshold)
|
|
Context.setDiagnosticsHotnessThreshold(PassRemarksHotnessThreshold);
|
|
Context.setDiagnosticsHotnessThreshold(PassRemarksHotnessThreshold);
|
|
|
|
|
|
- std::unique_ptr<tool_output_file> YamlFile;
|
|
|
|
|
|
+ std::unique_ptr<ToolOutputFile> YamlFile;
|
|
if (RemarksFilename != "") {
|
|
if (RemarksFilename != "") {
|
|
std::error_code EC;
|
|
std::error_code EC;
|
|
- YamlFile = llvm::make_unique<tool_output_file>(RemarksFilename, EC,
|
|
|
|
- sys::fs::F_None);
|
|
|
|
|
|
+ YamlFile =
|
|
|
|
+ llvm::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::F_None);
|
|
if (EC) {
|
|
if (EC) {
|
|
errs() << EC.message() << '\n';
|
|
errs() << EC.message() << '\n';
|
|
return 1;
|
|
return 1;
|
|
@@ -470,7 +469,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|
Options.FloatABIType = FloatABIForCalls;
|
|
Options.FloatABIType = FloatABIForCalls;
|
|
|
|
|
|
// Figure out where we are going to send the output.
|
|
// Figure out where we are going to send the output.
|
|
- std::unique_ptr<tool_output_file> Out =
|
|
|
|
|
|
+ std::unique_ptr<ToolOutputFile> Out =
|
|
GetOutputStream(TheTarget->getName(), TheTriple.getOS(), argv[0]);
|
|
GetOutputStream(TheTarget->getName(), TheTriple.getOS(), argv[0]);
|
|
if (!Out) return 1;
|
|
if (!Out) return 1;
|
|
|
|
|