Index: lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp =================================================================== --- lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp +++ lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp @@ -193,11 +193,10 @@ MethodAddressVector Functions; // Use symbol info to iterate functions in the object. - error_code ec; for (object::symbol_iterator I = Obj.begin_symbols(), E = Obj.end_symbols(); - I != E && !ec; - I.increment(ec)) { + I != E; + ++I) { std::vector LineInfo; std::string SourceFileName; @@ -234,7 +233,7 @@ FunctionMessage.line_number_table = 0; } else { SourceFileName = Lines.front().second.getFileName(); - FunctionMessage.source_file_name = (char *)SourceFileName.c_str(); + FunctionMessage.source_file_name = const_cast(SourceFileName.c_str()); FunctionMessage.line_number_size = LineInfo.size(); FunctionMessage.line_number_table = &*LineInfo.begin(); } Index: unittests/ExecutionEngine/JIT/IntelJITEventListenerTest.cpp =================================================================== --- unittests/ExecutionEngine/JIT/IntelJITEventListenerTest.cpp +++ unittests/ExecutionEngine/JIT/IntelJITEventListenerTest.cpp @@ -83,7 +83,7 @@ EXPECT_TRUE(0 != MockWrapper); Listener.reset(JITEventListener::createIntelJITEventListener( - MockWrapper.take())); + MockWrapper.release())); EXPECT_TRUE(0 != Listener); EE->RegisterJITEventListener(Listener.get()); }