File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -177,13 +177,6 @@ struct revcomp {
177177 { return lhs>rhs; }
178178};
179179
180- struct strrefcomp {
181- bool operator () (const StringRef& lhs, const StringRef& rhs) const
182- {
183- return lhs.compare (rhs) > 0 ;
184- }
185- };
186-
187180class JuliaJITEventListener : public JITEventListener
188181{
189182 std::map<size_t , ObjectInfo, revcomp> objectmap;
@@ -234,11 +227,13 @@ class JuliaJITEventListener: public JITEventListener
234227 SavedObject.second .release ();
235228
236229 object::section_iterator EndSection = debugObj.section_end ();
237- std::map<StringRef, object::SectionRef, strrefcomp > loadedSections;
230+ StringMap< object::SectionRef> loadedSections;
238231 for (const object::SectionRef &lSection: Object.sections ()) {
239232 auto sName = lSection.getName ();
240- if (sName )
241- loadedSections[*sName ] = lSection;
233+ if (sName ) {
234+ bool inserted = loadedSections.insert (std::make_pair (*sName , lSection)).second ;
235+ assert (inserted); (void )inserted;
236+ }
242237 }
243238 auto getLoadAddress = [&] (const StringRef &sName ) -> uint64_t {
244239 auto search = loadedSections.find (sName );
You can’t perform that action at this time.
0 commit comments