@@ -91,10 +91,8 @@ struct ObjectInfo {
91
91
const object::ObjectFile *object;
92
92
size_t SectionSize;
93
93
ptrdiff_t slide;
94
- #ifdef LLVM39
94
+ #ifdef LLVM37
95
95
DIContext *context;
96
- #elif defined(LLVM37)
97
- const llvm::LoadedObjectInfo *L;
98
96
#endif
99
97
#if defined(_OS_DARWIN_) && !defined(LLVM37)
100
98
const char *name;
@@ -444,11 +442,7 @@ class JuliaJITEventListener: public JITEventListener
444
442
ObjectInfo tmp = {&debugObj,
445
443
(size_t )SectionSize,
446
444
(ptrdiff_t )(SectionAddr - SectionLoadAddr),
447
- #ifdef LLVM39
448
445
new DWARFContextInMemory (debugObj, &L),
449
- #else
450
- L.clone ().release (),
451
- #endif
452
446
};
453
447
objectmap[SectionLoadAddr] = tmp;
454
448
first = false ;
@@ -524,11 +518,6 @@ class JuliaJITEventListener: public JITEventListener
524
518
#endif
525
519
ObjectInfo tmp = {objfile, (size_t )Size ,
526
520
(ptrdiff_t )(SectionAddr - SectionLoadAddr),
527
- #ifdef LLVM39
528
- new DWARFContextInMemory (*objfile, &L),
529
- #elif defined(LLVM37)
530
- L.clone ().release (),
531
- #endif
532
521
#ifdef _OS_DARWIN_
533
522
strndup (sName .data (), sName .size ()),
534
523
#endif
@@ -1066,10 +1055,8 @@ int jl_DI_for_fptr(uint64_t fptr, uint64_t *symsize, int64_t *slide, int64_t *se
1066
1055
*section_slide = fit->second .slide ;
1067
1056
*object = fit->second .object ;
1068
1057
if (context) {
1069
- #if defined(LLVM39 )
1058
+ #if defined(LLVM37 )
1070
1059
*context = fit->second .context ;
1071
- #elif defined(LLVM37)
1072
- *context = new DWARFContextInMemory (*fit->second .object , fit->second .L );
1073
1060
#else
1074
1061
*context = DIContext::getDWARFContext (*fit->second .object );
1075
1062
#endif
@@ -1121,13 +1108,6 @@ JL_DLLEXPORT uint64_t jl_get_section_start(uint64_t fptr)
1121
1108
1122
1109
#endif
1123
1110
1124
- void jl_cleanup_DI (llvm::DIContext *context)
1125
- {
1126
- #ifndef LLVM39
1127
- delete context;
1128
- #endif
1129
- }
1130
-
1131
1111
// Set *name and *filename to either NULL or malloc'd string
1132
1112
void jl_getFunctionInfo (char **name, char **filename, size_t *line,
1133
1113
char **inlinedat_file, size_t *inlinedat_line, jl_lambda_info_t **outer_linfo,
@@ -1151,7 +1131,6 @@ void jl_getFunctionInfo(char **name, char **filename, size_t *line,
1151
1131
if (jl_DI_for_fptr (pointer, &symsize, &slide, NULL , &object, &context)) {
1152
1132
*outer_linfo = jl_jit_events->lookupLinfo (pointer);
1153
1133
lookup_pointer (context, name, line, filename, inlinedat_line, inlinedat_file, pointer+slide, 1 , fromC);
1154
- jl_cleanup_DI (context);
1155
1134
return ;
1156
1135
}
1157
1136
#else // !USE_MCJIT
0 commit comments