summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 22:40:56 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 22:40:56 +0000
commit26e763753be5f3422a892f6c268721eae7792eac (patch)
tree9e724155ced23e2c15987f781c3ed75400f7072d /utils/TableGen/CodeGenTarget.cpp
parent2e68a02c264c26abc6ed62d59f18813fa7fdb95d (diff)
downloadllvm-26e763753be5f3422a892f6c268721eae7792eac.tar.gz
llvm-26e763753be5f3422a892f6c268721eae7792eac.tar.bz2
llvm-26e763753be5f3422a892f6c268721eae7792eac.tar.xz
Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 79bc30d8c9..0d29a2f355 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -490,12 +490,15 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R) {
OverloadedVTs.push_back(VT);
isOverloaded |= true;
}
+
IS.RetVTs.push_back(VT);
IS.RetTypeDefs.push_back(TyEl);
}
-
- if (IS.RetVTs.size() == 0)
- throw "Intrinsic '"+DefName+"' needs at least a type for the ret value!";
+
+ if (IS.RetVTs.size() == 1 && IS.RetVTs[0] == MVT::isVoid) {
+ IS.RetVTs.pop_back();
+ IS.RetTypeDefs.pop_back();
+ }
// Parse the list of parameter types.
TypeList = R->getValueAsListInit("ParamTypes");