Commit 543629bc by Nicolas Capens Committed by Nicolas Capens

Fix LLVM 3.0 build issue.

LLVM 3.0's raw_fd_ostream doesn't take an std::string as file name. Bug swiftshader:123 Bug b/123193054 Change-Id: I994f6fe5ce98c573d4be48737934b7c6c0127434 Reviewed-on: https://swiftshader-review.googlesource.com/c/24088Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 7521150e
......@@ -906,12 +906,14 @@ namespace rr
if(false)
{
#if REACTOR_LLVM_VERSION < 7
std::string error;
#else
std::error_code error;
#endif
llvm::raw_fd_ostream file(std::string(name) + "-llvm-dump-unopt.txt", error);
#if REACTOR_LLVM_VERSION < 7
std::string error;
llvm::raw_fd_ostream file((std::string(name) + "-llvm-dump-unopt.txt").c_str(), error);
#else
std::error_code error;
llvm::raw_fd_ostream file(std::string(name) + "-llvm-dump-unopt.txt", error);
#endif
::module->print(file, 0);
}
......@@ -922,12 +924,14 @@ namespace rr
if(false)
{
#if REACTOR_LLVM_VERSION < 7
std::string error;
#else
std::error_code error;
#endif
llvm::raw_fd_ostream file(std::string(name) + "-llvm-dump-opt.txt", error);
#if REACTOR_LLVM_VERSION < 7
std::string error;
llvm::raw_fd_ostream file((std::string(name) + "-llvm-dump-opt.txt").c_str(), error);
#else
std::error_code error;
llvm::raw_fd_ostream file(std::string(name) + "-llvm-dump-opt.txt", error);
#endif
::module->print(file, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment