24
24
#include < memory>
25
25
#include < vector>
26
26
27
- #define DEBUG_TYPE " orc"
28
-
29
27
namespace llvm {
30
28
namespace orc {
31
29
@@ -309,66 +307,6 @@ struct SymbolAliasMapEntry {
309
307
// / A map of Symbols to (Symbol, Flags) pairs.
310
308
using SymbolAliasMap = DenseMap<SymbolStringPtr, SymbolAliasMapEntry>;
311
309
312
- // / Render a SymbolStringPtr.
313
- raw_ostream &operator <<(raw_ostream &OS, const SymbolStringPtr &Sym);
314
-
315
- // / Render a SymbolNameSet.
316
- raw_ostream &operator <<(raw_ostream &OS, const SymbolNameSet &Symbols);
317
-
318
- // / Render a SymbolNameVector.
319
- raw_ostream &operator <<(raw_ostream &OS, const SymbolNameVector &Symbols);
320
-
321
- // / Render a SymbolFlagsMap entry.
322
- raw_ostream &operator <<(raw_ostream &OS, const SymbolFlagsMap::value_type &KV);
323
-
324
- // / Render a SymbolMap entry.
325
- raw_ostream &operator <<(raw_ostream &OS, const SymbolMap::value_type &KV);
326
-
327
- // / Render a SymbolFlagsMap.
328
- raw_ostream &operator <<(raw_ostream &OS, const SymbolFlagsMap &SymbolFlags);
329
-
330
- // / Render a SymbolMap.
331
- raw_ostream &operator <<(raw_ostream &OS, const SymbolMap &Symbols);
332
-
333
- // / Render a SymbolDependenceMap entry.
334
- raw_ostream &operator <<(raw_ostream &OS,
335
- const SymbolDependenceMap::value_type &KV);
336
-
337
- // / Render a SymbolDependendeMap.
338
- raw_ostream &operator <<(raw_ostream &OS, const SymbolDependenceMap &Deps);
339
-
340
- // / Render a MaterializationUnit.
341
- raw_ostream &operator <<(raw_ostream &OS, const MaterializationUnit &MU);
342
-
343
- // // Render a JITDylibLookupFlags instance.
344
- raw_ostream &operator <<(raw_ostream &OS,
345
- const JITDylibLookupFlags &JDLookupFlags);
346
-
347
- // / Rendar a SymbolLookupFlags instance.
348
- raw_ostream &operator <<(raw_ostream &OS, const SymbolLookupFlags &LookupFlags);
349
-
350
- // / Render a JITDylibLookupFlags instance.
351
- raw_ostream &operator <<(raw_ostream &OS, const LookupKind &K);
352
-
353
- // / Render a SymbolLookupSet entry.
354
- raw_ostream &operator <<(raw_ostream &OS, const SymbolLookupSet::value_type &KV);
355
-
356
- // / Render a SymbolLookupSet.
357
- raw_ostream &operator <<(raw_ostream &OS, const SymbolLookupSet &LookupSet);
358
-
359
- // / Render a JITDylibSearchOrder.
360
- raw_ostream &operator <<(raw_ostream &OS,
361
- const JITDylibSearchOrder &SearchOrder);
362
-
363
- // / Render a SymbolAliasMap.
364
- raw_ostream &operator <<(raw_ostream &OS, const SymbolAliasMap &Aliases);
365
-
366
- // / Render a SymbolState.
367
- raw_ostream &operator <<(raw_ostream &OS, const SymbolState &S);
368
-
369
- // / Render a LookupKind.
370
- raw_ostream &operator <<(raw_ostream &OS, const LookupKind &K);
371
-
372
310
// / Callback to notify client that symbols have been resolved.
373
311
using SymbolsResolvedCallback = unique_function<void (Expected<SymbolMap>)>;
374
312
@@ -1301,11 +1239,8 @@ class ExecutionSession {
1301
1239
// / Materialize the given unit.
1302
1240
void dispatchMaterialization (JITDylib &JD,
1303
1241
std::unique_ptr<MaterializationUnit> MU) {
1304
- LLVM_DEBUG ({
1305
- runSessionLocked ([&]() {
1306
- dbgs () << " Dispatching " << *MU << " for " << JD.getName () << " \n " ;
1307
- });
1308
- });
1242
+ assert (MU && " MU must be non-null" );
1243
+ DEBUG_WITH_TYPE (" orc" , dumpDispatchInfo (JD, *MU));
1309
1244
DispatchMaterialization (JD, std::move (MU));
1310
1245
}
1311
1246
@@ -1325,6 +1260,10 @@ class ExecutionSession {
1325
1260
1326
1261
void runOutstandingMUs ();
1327
1262
1263
+ #ifndef NDEBUG
1264
+ void dumpDispatchInfo (JITDylib &JD, MaterializationUnit &MU);
1265
+ #endif // NDEBUG
1266
+
1328
1267
mutable std::recursive_mutex SessionMutex;
1329
1268
std::shared_ptr<SymbolStringPool> SSP;
1330
1269
std::unique_ptr<Platform> P;
@@ -1425,6 +1364,4 @@ class ReexportsGenerator : public JITDylib::DefinitionGenerator {
1425
1364
} // End namespace orc
1426
1365
} // End namespace llvm
1427
1366
1428
- #undef DEBUG_TYPE // "orc"
1429
-
1430
1367
#endif // LLVM_EXECUTIONENGINE_ORC_CORE_H
0 commit comments