diff options
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | utils/TableGen/CodeGenTarget.cpp | 9 |
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"); |