mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
Remove dependency from lib/CAPI/IR/IR.cpp on registerAllDialects() (build fix)
This library does not depend on all the dialects, conceptually. This is changing the recently introduced `mlirContextLoadAllDialects()` function to not call `registerAllDialects()` itself, which aligns it better with the C++ code anyway (and this is deprecated and will be removed soon).
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include "mlir/IR/Module.h"
|
||||
#include "mlir/IR/Operation.h"
|
||||
#include "mlir/IR/Types.h"
|
||||
#include "mlir/InitAllDialects.h"
|
||||
#include "mlir/Parser.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
@@ -98,8 +97,7 @@ MlirContext mlirContextCreate() {
|
||||
void mlirContextDestroy(MlirContext context) { delete unwrap(context); }
|
||||
|
||||
void mlirContextLoadAllDialects(MlirContext context) {
|
||||
registerAllDialects(unwrap(context));
|
||||
getGlobalDialectRegistry().loadAll(unwrap(context));
|
||||
unwrap(context).loadAllGloballyRegisteredDialects();
|
||||
}
|
||||
|
||||
/* ========================================================================== */
|
||||
|
||||
Reference in New Issue
Block a user