diff options
author | Alexey Sotkin <alexey.sotkin@intel.com> | 2018-03-05 11:55:34 +0300 |
---|---|---|
committer | Alexey Sotkin <alexey.sotkin@intel.com> | 2018-04-03 17:17:38 +0300 |
commit | 223c78694394a61819ebc3e9b834dd8a38ec8678 (patch) | |
tree | 46dc1711f211fff985145074b24faebccfe1163a /tools | |
parent | 0f1efec411c52d4757b025a69295cee066e356af (diff) |
Upgrade SPIRV translator from LLVM 3.6 to LLVM 3.8
Change-Id: I97247b6472ff75ea83e12a485e06809ad2d2061c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-spirv/llvm-spirv.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/llvm-spirv/llvm-spirv.cpp b/tools/llvm-spirv/llvm-spirv.cpp index bbc7f97..34c5caf 100644 --- a/tools/llvm-spirv/llvm-spirv.cpp +++ b/tools/llvm-spirv/llvm-spirv.cpp @@ -119,14 +119,14 @@ convertLLVMToSPIRV() { LLVMContext Context;
std::string Err;
- DataStreamer *DS = getDataFileStreamer(InputFile, &Err);
+ std::unique_ptr<DataStreamer> DS = getDataFileStreamer(InputFile, &Err);
if (!DS) {
errs() << "Fails to open input file: " << Err;
return -1;
}
ErrorOr<std::unique_ptr<Module>> MOrErr =
- getStreamedBitcodeModule(InputFile, DS, Context);
+ getStreamedBitcodeModule(InputFile, std::move(DS), Context);
if (std::error_code EC = MOrErr.getError()) {
errs() << "Fails to load bitcode: " << EC.message();
@@ -135,7 +135,7 @@ convertLLVMToSPIRV() { std::unique_ptr<Module> M = std::move(*MOrErr);
- if (std::error_code EC = M->materializeAllPermanently()){
+ if (std::error_code EC = M->materializeAll()){
errs() << "Fails to materialize: " << EC.message();
return -1;
}
@@ -239,14 +239,14 @@ regularizeLLVM() { LLVMContext Context;
std::string Err;
- DataStreamer *DS = getDataFileStreamer(InputFile, &Err);
+ std::unique_ptr<DataStreamer> DS = getDataFileStreamer(InputFile, &Err);
if (!DS) {
errs() << "Fails to open input file: " << Err;
return -1;
}
ErrorOr<std::unique_ptr<Module>> MOrErr =
- getStreamedBitcodeModule(InputFile, DS, Context);
+ getStreamedBitcodeModule(InputFile, std::move(DS), Context);
if (std::error_code EC = MOrErr.getError()) {
errs() << "Fails to load bitcode: " << EC.message();
@@ -255,7 +255,7 @@ regularizeLLVM() { std::unique_ptr<Module> M = std::move(*MOrErr);
- if (std::error_code EC = M->materializeAllPermanently()){
+ if (std::error_code EC = M->materializeAll()){
errs() << "Fails to materialize: " << EC.message();
return -1;
}
|