diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-22 20:56:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-22 20:56:36 +0000 |
commit | 2109cb461c73a3df9d2b1344c9b4ce421efe8489 (patch) | |
tree | b8fe7dcc0d99156611903ca309adeffed67ad32e /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | a0ab4bf989cd69142b358a336d1e11486624d260 (diff) | |
download | bcm5719-llvm-2109cb461c73a3df9d2b1344c9b4ce421efe8489.tar.gz bcm5719-llvm-2109cb461c73a3df9d2b1344c9b4ce421efe8489.zip |
Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy. Now with a fix
for the verifier.
llvm-svn: 99206
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 79bc30d8c9a..0d29a2f3557 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/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"); |