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 | 829fd56544b3224d1c4df86c36dd962aa1f8d792 (patch) | |
| tree | 8cfd6d2eb0dc5903f09f8a3fdc7223480d43759a /utils/TableGen/CodeGenTarget.cpp | |
| parent | 96cb9dd1edb8ab5235f87450a0871d1d76386070 (diff) | |
| download | external_llvm-829fd56544b3224d1c4df86c36dd962aa1f8d792.zip external_llvm-829fd56544b3224d1c4df86c36dd962aa1f8d792.tar.gz external_llvm-829fd56544b3224d1c4df86c36dd962aa1f8d792.tar.bz2 | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99206 91177308-0d34-0410-b5e6-96231b3b80d8
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 79bc30d..0d29a2f 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"); |
