summaryrefslogtreecommitdiff
path: root/utils/TableGen/IntrinsicEmitter.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-03-19 23:04:23 +0000
committerEric Christopher <echristo@apple.com>2010-03-19 23:04:23 +0000
commitd7de54068ca6db50f4b54fb150af7b7c62573449 (patch)
tree688054401efe6c6ed8adc71b6d06221a536c7291 /utils/TableGen/IntrinsicEmitter.cpp
parent76a312b7d1c2b41394696510506967cd0794b831 (diff)
downloadllvm-d7de54068ca6db50f4b54fb150af7b7c62573449.tar.gz
llvm-d7de54068ca6db50f4b54fb150af7b7c62573449.tar.bz2
llvm-d7de54068ca6db50f4b54fb150af7b7c62573449.tar.xz
Revert r99009 temporarily it seems to be breaking the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/IntrinsicEmitter.cpp')
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index 417aca7cb3..c5df9e411c 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -172,11 +172,10 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
static void EmitTypeGenerate(raw_ostream &OS,
const std::vector<Record*> &ArgTypes,
unsigned &ArgNo) {
- if (ArgTypes.empty())
- return EmitTypeForValueType(OS, MVT::isVoid);
-
- if (ArgTypes.size() == 1)
- return EmitTypeGenerate(OS, ArgTypes.front(), ArgNo);
+ if (ArgTypes.size() == 1) {
+ EmitTypeGenerate(OS, ArgTypes.front(), ArgNo);
+ return;
+ }
OS << "StructType::get(Context, ";
@@ -252,11 +251,11 @@ namespace {
unsigned RHSSize = RHSVec->size();
unsigned LHSSize = LHSVec->size();
- for (; i != LHSSize; ++i) {
+ do {
if (i == RHSSize) return false; // RHS is shorter than LHS.
if ((*LHSVec)[i] != (*RHSVec)[i])
return (*LHSVec)[i]->getName() < (*RHSVec)[i]->getName();
- }
+ } while (++i != LHSSize);
if (i != RHSSize) return true;