Skip to content

Commit

Permalink
LLVM trunk: tool_output_file -> ToolOutputFile
Browse files Browse the repository at this point in the history
  • Loading branch information
dbabokin committed Nov 8, 2017
1 parent 2d5ff94 commit c2669b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cbackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5519,7 +5519,11 @@ WriteCXXFile(llvm::Module *module, const char *fn, int vectorWidth,
std::error_code error;
#endif

#if ISPC_LLVM_VERSION <= ISPC_LLVM_5_0
llvm::tool_output_file *of = new llvm::tool_output_file(fn, error, flags);
#else // LLVM 6.0+
llvm::ToolOutputFile *of = new llvm::ToolOutputFile(fn, error, flags);
#endif

#if ISPC_LLVM_VERSION <= ISPC_LLVM_3_5 // 3.2, 3.3, 3.4, 3.5
if (error.size()) {
Expand Down
4 changes: 3 additions & 1 deletion module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1532,8 +1532,10 @@ Module::writeObjectFileOrAssembly(llvm::TargetMachine *targetMachine,

#if ISPC_LLVM_VERSION <= ISPC_LLVM_3_6
llvm::tool_output_file *of = new llvm::tool_output_file(outFileName, error, flags);
#else // LLVM 3.7+
#elif ISPC_LLVM_VERSION <= ISPC_LLVM_5_0 // LLVM 3.7-5.0
std::unique_ptr<llvm::tool_output_file> of (new llvm::tool_output_file(outFileName, error, flags));
#else // LLVM 6.0+
std::unique_ptr<llvm::ToolOutputFile> of (new llvm::ToolOutputFile(outFileName, error, flags));
#endif

#if ISPC_LLVM_VERSION <= ISPC_LLVM_3_5
Expand Down

0 comments on commit c2669b2

Please sign in to comment.