Remove PointerType from target definition. Use abstract type MVT::iPTR to
represent pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28363 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h
index d30b8e3..8a8bf3d 100644
--- a/utils/TableGen/DAGISelEmitter.h
+++ b/utils/TableGen/DAGISelEmitter.h
@@ -169,10 +169,15 @@
void setName(const std::string &N) { Name = N; }
bool isLeaf() const { return Val != 0; }
- bool hasTypeSet() const { return Types[0] < MVT::LAST_VALUETYPE; }
+ bool hasTypeSet() const {
+ return (Types[0] < MVT::LAST_VALUETYPE) || (Types[0] == MVT::iPTR);
+ }
bool isTypeCompletelyUnknown() const {
return Types[0] == MVT::isUnknown;
}
+ bool isTypeDynamicallyResolved() const {
+ return Types[0] == MVT::iPTR;
+ }
MVT::ValueType getTypeNum(unsigned Num) const {
assert(hasTypeSet() && "Doesn't have a type yet!");
assert(Types.size() > Num && "Type num out of range!");
@@ -247,7 +252,7 @@
/// ContainsUnresolvedType - Return true if this tree contains any
/// unresolved types.
bool ContainsUnresolvedType() const {
- if (!hasTypeSet()) return true;
+ if (!hasTypeSet() && !isTypeDynamicallyResolved()) return true;
for (unsigned i = 0, e = getNumChildren(); i != e; ++i)
if (getChild(i)->ContainsUnresolvedType()) return true;
return false;