aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/IntrinsicEmitter.cpp
diff options
context:
space:
mode:
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 417aca7..c5df9e4 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;