Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index d1e9b03..502aee6 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -146,7 +146,7 @@
OS << "IntegerType::get(" << BitWidth << ")";
} else if (VT == MVT::Other) {
// MVT::OtherVT is used to mean the empty struct type here.
- OS << "StructType::get()";
+ OS << "StructType::get(Context)";
} else if (VT == MVT::f32) {
OS << "Type::FloatTy";
} else if (VT == MVT::f64) {
@@ -177,7 +177,7 @@
return;
}
- OS << "StructType::get(";
+ OS << "StructType::get(Context, ";
for (std::vector<Record*>::const_iterator
I = ArgTypes.begin(), E = ArgTypes.end(); I != E; ++I) {