llvm.org GIT mirror llvm / ec8891f
Changes in IntelJITEventListener - By Arch Robinson - take->release: LLVM has moved to C++11. MockWrapper became an instance of unique_ptr. - method symbol_iterator::increment disappeared recently, in this revision: r200442 | rafael | 2014-01-29 20:49:50 -0600 (Wed, 29 Jan 2014) | 9 lines Simplify the handling of iterators in ObjectFile. None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. My change mimics the change that the revision made to lib/DebugInfo/DWARFContext.cpp . - const_cast: Shut up a warning from gcc. I ran unittests/ExecutionEngine/JIT/Debug+Asserts/JITTests to make sure it worked. - Arch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205689 91177308-0d34-0410-b5e6-96231b3b80d8 Elena Demikhovsky 6 years ago
2 changed file(s) with 4 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
192192 MethodAddressVector Functions;
193193
194194 // Use symbol info to iterate functions in the object.
195 error_code ec;
196195 for (object::symbol_iterator I = Obj.begin_symbols(),
197196 E = Obj.end_symbols();
198 I != E && !ec;
199 I.increment(ec)) {
197 I != E;
198 ++I) {
200199 std::vector LineInfo;
201200 std::string SourceFileName;
202201
233232 FunctionMessage.line_number_table = 0;
234233 } else {
235234 SourceFileName = Lines.front().second.getFileName();
236 FunctionMessage.source_file_name = (char *)SourceFileName.c_str();
235 FunctionMessage.source_file_name = const_cast(SourceFileName.c_str());
237236 FunctionMessage.line_number_size = LineInfo.size();
238237 FunctionMessage.line_number_table = &*LineInfo.begin();
239238 }
8282 EXPECT_TRUE(0 != MockWrapper);
8383
8484 Listener.reset(JITEventListener::createIntelJITEventListener(
85 MockWrapper.take()));
85 MockWrapper.release()));
8686 EXPECT_TRUE(0 != Listener);
8787 EE->RegisterJITEventListener(Listener.get());
8888 }