diff --git a/rocclr/runtime/device/pal/palcompiler.cpp b/rocclr/runtime/device/pal/palcompiler.cpp index a0ef0698d6..3dbcde82b3 100644 --- a/rocclr/runtime/device/pal/palcompiler.cpp +++ b/rocclr/runtime/device/pal/palcompiler.cpp @@ -182,7 +182,7 @@ static void checkLLVM_BIN() { } #endif // defined(ATI_OS_LINUX) -std::auto_ptr LightningProgram::newCompilerInstance() { +std::unique_ptr LightningProgram::newCompilerInstance() { #if defined(ATI_OS_WIN) static INIT_ONCE initOnce; InitOnceExecuteOnce(&initOnce, checkLLVM_BIN, NULL, NULL); @@ -199,7 +199,7 @@ std::auto_ptr LightningProgram::newCompilerInstanc } #endif // defined(DEBUG) - return std::auto_ptr( + return std::unique_ptr( amd::opencl_driver::CompilerFactory().CreateAMDGPUCompiler(llvmBin_)); } @@ -207,7 +207,7 @@ bool LightningProgram::compileImpl(const std::string& sourceCode, const std::vector& headers, const char** headerIncludeNames, amd::option::Options* options) { using namespace amd::opencl_driver; - std::auto_ptr C(newCompilerInstance()); + std::unique_ptr C(newCompilerInstance()); std::vector inputs; Data* input = C->NewBufferReference(DT_CL, sourceCode.c_str(), sourceCode.length()); diff --git a/rocclr/runtime/device/pal/palprogram.cpp b/rocclr/runtime/device/pal/palprogram.cpp index 2be859a4c3..d72aca8412 100644 --- a/rocclr/runtime/device/pal/palprogram.cpp +++ b/rocclr/runtime/device/pal/palprogram.cpp @@ -1217,7 +1217,7 @@ bool LightningProgram::createBinary(amd::option::Options* options) { bool LightningProgram::linkImpl(const std::vector& inputPrograms, amd::option::Options* options, bool createLibrary) { using namespace amd::opencl_driver; - std::auto_ptr C(newCompilerInstance()); + std::unique_ptr C(newCompilerInstance()); std::vector inputs; for (auto program : (const std::vector&)inputPrograms) { @@ -1327,7 +1327,7 @@ bool LightningProgram::linkImpl(amd::option::Options* options) { return false; } - std::auto_ptr C(newCompilerInstance()); + std::unique_ptr C(newCompilerInstance()); // call LinkLLVMBitcode std::vector inputs; diff --git a/rocclr/runtime/device/pal/palprogram.hpp b/rocclr/runtime/device/pal/palprogram.hpp index 1bc291a5e2..0c472b2699 100644 --- a/rocclr/runtime/device/pal/palprogram.hpp +++ b/rocclr/runtime/device/pal/palprogram.hpp @@ -319,7 +319,7 @@ class LightningProgram : public HSAILProgram { virtual bool createBinary(amd::option::Options* options) override; //! Return a new transient compiler instance. - static std::auto_ptr newCompilerInstance(); + static std::unique_ptr newCompilerInstance(); private: CodeObjectMD* metadata_; //!< Runtime metadata