blob: e4eaf6313780e60d86f6bccd656407eb12919753 [file] [log] [blame]
Reid Spencer5f016e22007-07-11 17:01:13 +00001//===--- TargetInfo.cpp - Information about Target machine ----------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner0bc735f2007-12-29 19:59:25 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Reid Spencer5f016e22007-07-11 17:01:13 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the TargetInfo and TargetInfoImpl interfaces.
11//
12//===----------------------------------------------------------------------===//
13
14#include "clang/Basic/TargetInfo.h"
John Thompsona6fda122009-11-05 20:14:16 +000015#include "clang/Basic/LangOptions.h"
Chris Lattner525a0502007-09-22 18:29:59 +000016#include "llvm/ADT/APFloat.h"
Anders Carlsson6fa90862007-11-25 00:25:21 +000017#include "llvm/ADT/STLExtras.h"
Chris Lattner5483bdf2008-04-06 04:02:29 +000018#include <cstdlib>
Reid Spencer5f016e22007-07-11 17:01:13 +000019using namespace clang;
20
Chris Lattnercd4fc422008-03-08 08:59:43 +000021// TargetInfo Constructor.
22TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
Daniel Dunbarb6a16932010-04-15 06:18:39 +000023 // Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or
24 // SPARC. These should be overridden by concrete targets as needed.
Eli Friedmanb030f022009-04-19 21:38:35 +000025 TLSSupported = true;
Chris Lattner9bffb072010-04-23 16:29:58 +000026 NoAsmVariants = false;
Chris Lattner927686f2008-05-09 06:08:39 +000027 PointerWidth = PointerAlign = 32;
Chris Lattner2621fd12008-05-08 05:58:21 +000028 IntWidth = IntAlign = 32;
Chris Lattnerec10f582008-05-09 05:50:02 +000029 LongWidth = LongAlign = 32;
30 LongLongWidth = LongLongAlign = 64;
Eli Friedman61538a72008-05-20 14:21:01 +000031 FloatWidth = 32;
32 FloatAlign = 32;
Nate Begeman3d292062008-04-18 17:17:24 +000033 DoubleWidth = 64;
Eli Friedman61538a72008-05-20 14:21:01 +000034 DoubleAlign = 64;
35 LongDoubleWidth = 64;
36 LongDoubleAlign = 64;
Rafael Espindola6deecb02010-06-04 23:15:27 +000037 LargeArrayMinWidth = 0;
38 LargeArrayAlign = 0;
Anders Carlsson6a3615c2008-10-31 16:05:19 +000039 SizeType = UnsignedLong;
Eli Friedmanf509d732008-11-02 02:43:55 +000040 PtrDiffType = SignedLong;
Sanjiv Gupta31fc07d2008-10-31 09:52:39 +000041 IntMaxType = SignedLongLong;
42 UIntMaxType = UnsignedLongLong;
Chris Lattner6ad474f2009-02-13 22:28:55 +000043 IntPtrType = SignedLong;
Eli Friedmanf509d732008-11-02 02:43:55 +000044 WCharType = SignedInt;
Chris Lattnere64ef802009-10-21 04:59:34 +000045 WIntType = SignedInt;
Alisdair Meredithf5c209d2009-07-14 06:30:34 +000046 Char16Type = UnsignedShort;
47 Char32Type = UnsignedInt;
Eli Friedman3c7b6e42009-07-01 03:36:11 +000048 Int64Type = SignedLongLong;
Edward O'Callaghan9cf910e2009-11-21 00:49:54 +000049 SigAtomicType = SignedInt;
Daniel Dunbarb6830d62010-04-15 15:06:18 +000050 UseBitFieldTypeAlignment = true;
Chris Lattnercd4fc422008-03-08 08:59:43 +000051 FloatFormat = &llvm::APFloat::IEEEsingle;
52 DoubleFormat = &llvm::APFloat::IEEEdouble;
53 LongDoubleFormat = &llvm::APFloat::IEEEdouble;
Eli Friedmaned855cb2008-08-21 00:13:15 +000054 DescriptionString = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
Chris Lattner1932e122009-11-07 18:59:41 +000055 "i64:64:64-f32:32:32-f64:64:64-n32";
Chris Lattner3fdf4672008-10-05 19:22:37 +000056 UserLabelPrefix = "_";
Daniel Dunbar613fd672010-05-27 00:35:16 +000057 HasAlignMac68kSupport = false;
Chris Lattnercd4fc422008-03-08 08:59:43 +000058}
59
Chris Lattner0eaed122008-03-08 08:24:01 +000060// Out of line virtual dtor for TargetInfo.
61TargetInfo::~TargetInfo() {}
Reid Spencer5f016e22007-07-11 17:01:13 +000062
Chris Lattner2b5abf52009-02-06 05:04:11 +000063/// getTypeName - Return the user string for the specified integer type enum.
64/// For example, SignedShort -> "short".
65const char *TargetInfo::getTypeName(IntType T) {
66 switch (T) {
67 default: assert(0 && "not an integer!");
68 case SignedShort: return "short";
69 case UnsignedShort: return "unsigned short";
70 case SignedInt: return "int";
71 case UnsignedInt: return "unsigned int";
72 case SignedLong: return "long int";
73 case UnsignedLong: return "long unsigned int";
74 case SignedLongLong: return "long long int";
75 case UnsignedLongLong: return "long long unsigned int";
76 }
77}
78
Chris Lattnerb304f772009-10-21 06:24:21 +000079/// getTypeConstantSuffix - Return the constant suffix for the specified
80/// integer type enum. For example, SignedLong -> "L".
81const char *TargetInfo::getTypeConstantSuffix(IntType T) {
82 switch (T) {
83 default: assert(0 && "not an integer!");
84 case SignedShort:
85 case SignedInt: return "";
86 case SignedLong: return "L";
87 case SignedLongLong: return "LL";
88 case UnsignedShort:
89 case UnsignedInt: return "U";
90 case UnsignedLong: return "UL";
91 case UnsignedLongLong: return "ULL";
92 }
93}
94
95/// getTypeWidth - Return the width (in bits) of the specified integer type
96/// enum. For example, SignedInt -> getIntWidth().
97unsigned TargetInfo::getTypeWidth(IntType T) const {
98 switch (T) {
99 default: assert(0 && "not an integer!");
Chris Lattner9099e7b2009-11-05 21:21:32 +0000100 case SignedShort:
Chris Lattnerb304f772009-10-21 06:24:21 +0000101 case UnsignedShort: return getShortWidth();
Chris Lattner9099e7b2009-11-05 21:21:32 +0000102 case SignedInt:
Chris Lattnerb304f772009-10-21 06:24:21 +0000103 case UnsignedInt: return getIntWidth();
Chris Lattner9099e7b2009-11-05 21:21:32 +0000104 case SignedLong:
Chris Lattnerb304f772009-10-21 06:24:21 +0000105 case UnsignedLong: return getLongWidth();
Chris Lattner9099e7b2009-11-05 21:21:32 +0000106 case SignedLongLong:
Chris Lattnerb304f772009-10-21 06:24:21 +0000107 case UnsignedLongLong: return getLongLongWidth();
108 };
109}
110
Chris Lattner9099e7b2009-11-05 21:21:32 +0000111/// getTypeAlign - Return the alignment (in bits) of the specified integer type
112/// enum. For example, SignedInt -> getIntAlign().
113unsigned TargetInfo::getTypeAlign(IntType T) const {
114 switch (T) {
115 default: assert(0 && "not an integer!");
116 case SignedShort:
117 case UnsignedShort: return getShortAlign();
118 case SignedInt:
119 case UnsignedInt: return getIntAlign();
120 case SignedLong:
121 case UnsignedLong: return getLongAlign();
122 case SignedLongLong:
123 case UnsignedLongLong: return getLongLongAlign();
124 };
125}
126
Chris Lattner961f0702009-10-25 22:49:18 +0000127/// isTypeSigned - Return whether an integer types is signed. Returns true if
Chris Lattnerb304f772009-10-21 06:24:21 +0000128/// the type is signed; false otherwise.
Chris Lattner961f0702009-10-25 22:49:18 +0000129bool TargetInfo::isTypeSigned(IntType T) const {
Chris Lattnerb304f772009-10-21 06:24:21 +0000130 switch (T) {
131 default: assert(0 && "not an integer!");
132 case SignedShort:
133 case SignedInt:
134 case SignedLong:
135 case SignedLongLong:
136 return true;
137 case UnsignedShort:
138 case UnsignedInt:
139 case UnsignedLong:
140 case UnsignedLongLong:
141 return false;
142 };
143}
144
John Thompsona6fda122009-11-05 20:14:16 +0000145/// setForcedLangOptions - Set forced language options.
146/// Apply changes to the target information with respect to certain
147/// language options which change the target configuration.
148void TargetInfo::setForcedLangOptions(LangOptions &Opts) {
Daniel Dunbarfb937b82010-04-15 15:06:22 +0000149 if (Opts.NoBitFieldTypeAlign)
150 UseBitFieldTypeAlignment = false;
151 if (Opts.ShortWChar)
John Thompsona6fda122009-11-05 20:14:16 +0000152 WCharType = UnsignedShort;
John Thompsona6fda122009-11-05 20:14:16 +0000153}
Chris Lattnerb304f772009-10-21 06:24:21 +0000154
Chris Lattner525a0502007-09-22 18:29:59 +0000155//===----------------------------------------------------------------------===//
Chris Lattner525a0502007-09-22 18:29:59 +0000156
Reid Spencer5f016e22007-07-11 17:01:13 +0000157
Anders Carlsson83c021c2010-01-30 19:12:25 +0000158static llvm::StringRef removeGCCRegisterPrefix(llvm::StringRef Name) {
Anders Carlssonea041752008-02-06 00:11:32 +0000159 if (Name[0] == '%' || Name[0] == '#')
Anders Carlsson83c021c2010-01-30 19:12:25 +0000160 Name = Name.substr(1);
161
162 return Name;
Anders Carlssonea041752008-02-06 00:11:32 +0000163}
164
Anders Carlsson3346ae62007-11-24 23:38:12 +0000165/// isValidGCCRegisterName - Returns whether the passed in string
166/// is a valid register name according to GCC. This is used by Sema for
167/// inline asm statements.
Anders Carlsson83c021c2010-01-30 19:12:25 +0000168bool TargetInfo::isValidGCCRegisterName(llvm::StringRef Name) const {
169 if (Name.empty())
170 return false;
171
Anders Carlsson6fa90862007-11-25 00:25:21 +0000172 const char * const *Names;
173 unsigned NumNames;
Mike Stump1eb44332009-09-09 15:08:12 +0000174
Anders Carlsson6fa90862007-11-25 00:25:21 +0000175 // Get rid of any register prefix.
Anders Carlsson83c021c2010-01-30 19:12:25 +0000176 Name = removeGCCRegisterPrefix(Name);
Anders Carlssonea041752008-02-06 00:11:32 +0000177
Anders Carlsson83c021c2010-01-30 19:12:25 +0000178 if (Name == "memory" || Name == "cc")
Anders Carlsson6fa90862007-11-25 00:25:21 +0000179 return true;
Mike Stump1eb44332009-09-09 15:08:12 +0000180
Chris Lattner0eaed122008-03-08 08:24:01 +0000181 getGCCRegNames(Names, NumNames);
Mike Stump1eb44332009-09-09 15:08:12 +0000182
Anders Carlsson6fa90862007-11-25 00:25:21 +0000183 // If we have a number it maps to an entry in the register name array.
184 if (isdigit(Name[0])) {
Anders Carlsson83c021c2010-01-30 19:12:25 +0000185 int n;
186 if (!Name.getAsInteger(0, n))
Anders Carlsson6fa90862007-11-25 00:25:21 +0000187 return n >= 0 && (unsigned)n < NumNames;
188 }
189
190 // Check register names.
191 for (unsigned i = 0; i < NumNames; i++) {
Anders Carlsson83c021c2010-01-30 19:12:25 +0000192 if (Name == Names[i])
Anders Carlsson6fa90862007-11-25 00:25:21 +0000193 return true;
194 }
Mike Stump1eb44332009-09-09 15:08:12 +0000195
Anders Carlsson6fa90862007-11-25 00:25:21 +0000196 // Now check aliases.
Chris Lattner0eaed122008-03-08 08:24:01 +0000197 const GCCRegAlias *Aliases;
Anders Carlsson6fa90862007-11-25 00:25:21 +0000198 unsigned NumAliases;
Mike Stump1eb44332009-09-09 15:08:12 +0000199
Chris Lattner0eaed122008-03-08 08:24:01 +0000200 getGCCRegAliases(Aliases, NumAliases);
Anders Carlsson6fa90862007-11-25 00:25:21 +0000201 for (unsigned i = 0; i < NumAliases; i++) {
202 for (unsigned j = 0 ; j < llvm::array_lengthof(Aliases[i].Aliases); j++) {
203 if (!Aliases[i].Aliases[j])
204 break;
Anders Carlsson83c021c2010-01-30 19:12:25 +0000205 if (Aliases[i].Aliases[j] == Name)
Anders Carlsson6fa90862007-11-25 00:25:21 +0000206 return true;
207 }
208 }
Mike Stump1eb44332009-09-09 15:08:12 +0000209
Anders Carlsson3346ae62007-11-24 23:38:12 +0000210 return false;
211}
Anders Carlssond04c6e22007-11-27 04:11:28 +0000212
Anders Carlsson83c021c2010-01-30 19:12:25 +0000213llvm::StringRef
214TargetInfo::getNormalizedGCCRegisterName(llvm::StringRef Name) const {
Anders Carlssond04c6e22007-11-27 04:11:28 +0000215 assert(isValidGCCRegisterName(Name) && "Invalid register passed in");
Mike Stump1eb44332009-09-09 15:08:12 +0000216
Anders Carlsson83c021c2010-01-30 19:12:25 +0000217 // Get rid of any register prefix.
218 Name = removeGCCRegisterPrefix(Name);
Mike Stump1eb44332009-09-09 15:08:12 +0000219
Anders Carlssond04c6e22007-11-27 04:11:28 +0000220 const char * const *Names;
221 unsigned NumNames;
222
Chris Lattner0eaed122008-03-08 08:24:01 +0000223 getGCCRegNames(Names, NumNames);
Anders Carlssond04c6e22007-11-27 04:11:28 +0000224
225 // First, check if we have a number.
226 if (isdigit(Name[0])) {
Anders Carlsson83c021c2010-01-30 19:12:25 +0000227 int n;
228 if (!Name.getAsInteger(0, n)) {
Mike Stump1eb44332009-09-09 15:08:12 +0000229 assert(n >= 0 && (unsigned)n < NumNames &&
Anders Carlssond04c6e22007-11-27 04:11:28 +0000230 "Out of bounds register number!");
231 return Names[n];
232 }
233 }
Mike Stump1eb44332009-09-09 15:08:12 +0000234
Anders Carlssond04c6e22007-11-27 04:11:28 +0000235 // Now check aliases.
Chris Lattner0eaed122008-03-08 08:24:01 +0000236 const GCCRegAlias *Aliases;
Anders Carlssond04c6e22007-11-27 04:11:28 +0000237 unsigned NumAliases;
Mike Stump1eb44332009-09-09 15:08:12 +0000238
Chris Lattner0eaed122008-03-08 08:24:01 +0000239 getGCCRegAliases(Aliases, NumAliases);
Anders Carlssond04c6e22007-11-27 04:11:28 +0000240 for (unsigned i = 0; i < NumAliases; i++) {
241 for (unsigned j = 0 ; j < llvm::array_lengthof(Aliases[i].Aliases); j++) {
242 if (!Aliases[i].Aliases[j])
243 break;
Anders Carlsson83c021c2010-01-30 19:12:25 +0000244 if (Aliases[i].Aliases[j] == Name)
Anders Carlssond04c6e22007-11-27 04:11:28 +0000245 return Aliases[i].Register;
246 }
247 }
Mike Stump1eb44332009-09-09 15:08:12 +0000248
Anders Carlssond04c6e22007-11-27 04:11:28 +0000249 return Name;
250}
251
Chris Lattner432c8692009-04-26 17:19:08 +0000252bool TargetInfo::validateOutputConstraint(ConstraintInfo &Info) const {
253 const char *Name = Info.getConstraintStr().c_str();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000254 // An output constraint must start with '=' or '+'
255 if (*Name != '=' && *Name != '+')
256 return false;
257
258 if (*Name == '+')
Chris Lattner44def072009-04-26 07:16:29 +0000259 Info.setIsReadWrite();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000260
261 Name++;
262 while (*Name) {
263 switch (*Name) {
264 default:
Chris Lattner44def072009-04-26 07:16:29 +0000265 if (!validateAsmConstraint(Name, Info)) {
Ted Kremenek5ab201a2008-04-24 16:36:38 +0000266 // FIXME: We temporarily return false
Anders Carlssond04c6e22007-11-27 04:11:28 +0000267 // so we can add more constraints as we hit it.
268 // Eventually, an unknown constraint should just be treated as 'g'.
Ted Kremenek5ab201a2008-04-24 16:36:38 +0000269 return false;
Anders Carlssond04c6e22007-11-27 04:11:28 +0000270 }
271 case '&': // early clobber.
272 break;
Chris Lattner40539832009-10-13 04:32:07 +0000273 case '%': // commutative.
274 // FIXME: Check that there is a another register after this one.
275 break;
Anders Carlssond04c6e22007-11-27 04:11:28 +0000276 case 'r': // general register.
Chris Lattner44def072009-04-26 07:16:29 +0000277 Info.setAllowsRegister();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000278 break;
279 case 'm': // memory operand.
Chris Lattner44def072009-04-26 07:16:29 +0000280 Info.setAllowsMemory();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000281 break;
282 case 'g': // general register, memory operand or immediate integer.
Anders Carlsson775841f2009-01-18 02:12:04 +0000283 case 'X': // any operand.
Chris Lattner44def072009-04-26 07:16:29 +0000284 Info.setAllowsRegister();
285 Info.setAllowsMemory();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000286 break;
John Thompsonbb0cf4a2010-07-09 22:49:34 +0000287 case ',': // FIXME: Until we handle multiple alternative constraints,
288 return true; // ignore everything after the first comma.
Anders Carlssond04c6e22007-11-27 04:11:28 +0000289 }
Mike Stump1eb44332009-09-09 15:08:12 +0000290
Anders Carlssond04c6e22007-11-27 04:11:28 +0000291 Name++;
292 }
Mike Stump1eb44332009-09-09 15:08:12 +0000293
Anders Carlssond04c6e22007-11-27 04:11:28 +0000294 return true;
295}
296
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000297bool TargetInfo::resolveSymbolicName(const char *&Name,
Chris Lattner2819fa82009-04-26 17:57:12 +0000298 ConstraintInfo *OutputConstraints,
299 unsigned NumOutputs,
Chris Lattner44def072009-04-26 07:16:29 +0000300 unsigned &Index) const {
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000301 assert(*Name == '[' && "Symbolic name did not start with '['");
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000302 Name++;
303 const char *Start = Name;
304 while (*Name && *Name != ']')
305 Name++;
Mike Stump1eb44332009-09-09 15:08:12 +0000306
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000307 if (!*Name) {
308 // Missing ']'
309 return false;
310 }
Mike Stump1eb44332009-09-09 15:08:12 +0000311
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000312 std::string SymbolicName(Start, Name - Start);
Mike Stump1eb44332009-09-09 15:08:12 +0000313
Chris Lattner2819fa82009-04-26 17:57:12 +0000314 for (Index = 0; Index != NumOutputs; ++Index)
315 if (SymbolicName == OutputConstraints[Index].getName())
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000316 return true;
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000317
318 return false;
319}
320
Chris Lattner2819fa82009-04-26 17:57:12 +0000321bool TargetInfo::validateInputConstraint(ConstraintInfo *OutputConstraints,
322 unsigned NumOutputs,
Chris Lattner44def072009-04-26 07:16:29 +0000323 ConstraintInfo &Info) const {
Chris Lattner432c8692009-04-26 17:19:08 +0000324 const char *Name = Info.ConstraintStr.c_str();
325
Anders Carlssond04c6e22007-11-27 04:11:28 +0000326 while (*Name) {
327 switch (*Name) {
328 default:
329 // Check if we have a matching constraint
330 if (*Name >= '0' && *Name <= '9') {
331 unsigned i = *Name - '0';
Mike Stump1eb44332009-09-09 15:08:12 +0000332
Anders Carlssond04c6e22007-11-27 04:11:28 +0000333 // Check if matching constraint is out of bounds.
334 if (i >= NumOutputs)
335 return false;
Mike Stump1eb44332009-09-09 15:08:12 +0000336
337 // The constraint should have the same info as the respective
Anders Carlsson03eb5432009-01-27 20:38:24 +0000338 // output constraint.
Chris Lattnerd6887612009-04-26 18:05:25 +0000339 Info.setTiedOperand(i, OutputConstraints[i]);
Chris Lattner44def072009-04-26 07:16:29 +0000340 } else if (!validateAsmConstraint(Name, Info)) {
Daniel Dunbar302684c2008-08-25 09:46:27 +0000341 // FIXME: This error return is in place temporarily so we can
342 // add more constraints as we hit it. Eventually, an unknown
343 // constraint should just be treated as 'g'.
344 return false;
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000345 }
346 break;
347 case '[': {
348 unsigned Index = 0;
Chris Lattner2819fa82009-04-26 17:57:12 +0000349 if (!resolveSymbolicName(Name, OutputConstraints, NumOutputs, Index))
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000350 return false;
Mike Stump1eb44332009-09-09 15:08:12 +0000351
Anders Carlsson42e1ee02009-01-18 01:56:57 +0000352 break;
Mike Stump1eb44332009-09-09 15:08:12 +0000353 }
Anders Carlsson44fe49c2007-12-08 19:32:57 +0000354 case '%': // commutative
355 // FIXME: Fail if % is used with the last operand.
356 break;
Anders Carlssond04c6e22007-11-27 04:11:28 +0000357 case 'i': // immediate integer.
Anders Carlssonefdfa772008-03-09 06:02:02 +0000358 case 'n': // immediate integer with a known value.
Anders Carlssond04c6e22007-11-27 04:11:28 +0000359 break;
Chris Lattner1d138792009-05-06 04:33:31 +0000360 case 'I': // Various constant constraints with target-specific meanings.
361 case 'J':
362 case 'K':
363 case 'L':
364 case 'M':
365 case 'N':
366 case 'O':
367 case 'P':
368 break;
Anders Carlssond04c6e22007-11-27 04:11:28 +0000369 case 'r': // general register.
Chris Lattner44def072009-04-26 07:16:29 +0000370 Info.setAllowsRegister();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000371 break;
372 case 'm': // memory operand.
Nuno Lopesaa8e3612009-12-16 14:28:21 +0000373 case 'o': // offsettable memory operand
374 case 'V': // non-offsettable memory operand
Chris Lattner44def072009-04-26 07:16:29 +0000375 Info.setAllowsMemory();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000376 break;
377 case 'g': // general register, memory operand or immediate integer.
Anders Carlsson775841f2009-01-18 02:12:04 +0000378 case 'X': // any operand.
Chris Lattner44def072009-04-26 07:16:29 +0000379 Info.setAllowsRegister();
380 Info.setAllowsMemory();
Anders Carlssond04c6e22007-11-27 04:11:28 +0000381 break;
John Thompsonbb0cf4a2010-07-09 22:49:34 +0000382 case ',': // FIXME: Until we handle multiple alternative constraints,
383 return true; // ignore everything after the first comma.
Anders Carlssond04c6e22007-11-27 04:11:28 +0000384 }
Mike Stump1eb44332009-09-09 15:08:12 +0000385
Anders Carlssond04c6e22007-11-27 04:11:28 +0000386 Name++;
387 }
Mike Stump1eb44332009-09-09 15:08:12 +0000388
Anders Carlssond04c6e22007-11-27 04:11:28 +0000389 return true;
390}