1 //===--- TargetInfo.h - Expose information about the target -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the TargetInfo interface.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_BASIC_TARGETINFO_H
15 #define LLVM_CLANG_BASIC_TARGETINFO_H
17 #include "clang/Basic/LLVM.h"
18 #include "llvm/ADT/IntrusiveRefCntPtr.h"
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ADT/StringSwitch.h"
22 #include "llvm/ADT/Triple.h"
23 #include "llvm/Support/DataTypes.h"
24 #include "clang/Basic/AddressSpaces.h"
25 #include "clang/Basic/VersionTuple.h"
35 class DiagnosticsEngine;
42 namespace Builtin { struct Info; }
44 /// TargetCXXABI - The types of C++ ABIs for which we can generate code.
46 /// The generic ("Itanium") C++ ABI, documented at:
47 /// http://www.codesourcery.com/public/cxx-abi/
50 /// The ARM C++ ABI, based largely on the Itanium ABI but with
51 /// significant differences.
52 /// http://infocenter.arm.com
53 /// /help/topic/com.arm.doc.ihi0041c/IHI0041C_cppabi.pdf
56 /// The Visual Studio ABI. Only scattered official documentation exists.
60 /// TargetInfo - This class exposes information about the current target.
62 class TargetInfo : public RefCountedBase<TargetInfo> {
65 // Target values set by the ctor of the actual target implementation. Default
66 // values are specified by the TargetInfo constructor.
69 bool NoAsmVariants; // True if {|} are normal characters.
70 unsigned char PointerWidth, PointerAlign;
71 unsigned char BoolWidth, BoolAlign;
72 unsigned char IntWidth, IntAlign;
73 unsigned char HalfWidth, HalfAlign;
74 unsigned char FloatWidth, FloatAlign;
75 unsigned char DoubleWidth, DoubleAlign;
76 unsigned char LongDoubleWidth, LongDoubleAlign;
77 unsigned char LargeArrayMinWidth, LargeArrayAlign;
78 unsigned char LongWidth, LongAlign;
79 unsigned char LongLongWidth, LongLongAlign;
80 unsigned char SuitableAlign;
81 unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth;
82 const char *DescriptionString;
83 const char *UserLabelPrefix;
84 const char *MCountName;
85 const llvm::fltSemantics *HalfFormat, *FloatFormat, *DoubleFormat,
87 unsigned char RegParmMax, SSERegParmMax;
89 const LangAS::Map *AddrSpaceMap;
91 mutable StringRef PlatformName;
92 mutable VersionTuple PlatformMinVersion;
94 unsigned HasAlignMac68kSupport : 1;
95 unsigned RealTypeUsesObjCFPRet : 3;
96 unsigned ComplexLongDoubleUsesFP2Ret : 1;
98 // TargetInfo Constructor. Default initializes all fields.
99 TargetInfo(const std::string &T);
102 /// CreateTargetInfo - Construct a target for the given options.
104 /// \param Opts - The options to use to initialize the target. The target may
105 /// modify the options to canonicalize the target feature information to match
106 /// what the backend expects.
107 static TargetInfo* CreateTargetInfo(DiagnosticsEngine &Diags,
108 TargetOptions &Opts);
110 virtual ~TargetInfo();
112 ///===---- Target Data Type Query Methods -------------------------------===//
132 IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType,
133 WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType;
135 /// Flag whether the Objective-C built-in boolean type should be signed char.
136 /// Otherwise, when this flag is not set, the normal built-in boolean type is
138 unsigned UseSignedCharForObjCBool : 1;
140 /// Control whether the alignment of bit-field types is respected when laying
141 /// out structures. If true, then the alignment of the bit-field type will be
142 /// used to (a) impact the alignment of the containing structure, and (b)
143 /// ensure that the individual bit-field will not straddle an alignment
145 unsigned UseBitFieldTypeAlignment : 1;
147 /// Control whether zero length bitfields (e.g., int : 0;) force alignment of
148 /// the next bitfield. If the alignment of the zero length bitfield is
149 /// greater than the member that follows it, `bar', `bar' will be aligned as
150 /// the type of the zero-length bitfield.
151 unsigned UseZeroLengthBitfieldAlignment : 1;
153 /// If non-zero, specifies a fixed alignment value for bitfields that follow
154 /// zero length bitfield, regardless of the zero length bitfield type.
155 unsigned ZeroLengthBitfieldBoundary;
158 IntType getSizeType() const { return SizeType; }
159 IntType getIntMaxType() const { return IntMaxType; }
160 IntType getUIntMaxType() const { return UIntMaxType; }
161 IntType getPtrDiffType(unsigned AddrSpace) const {
162 return AddrSpace == 0 ? PtrDiffType : getPtrDiffTypeV(AddrSpace);
164 IntType getIntPtrType() const { return IntPtrType; }
165 IntType getWCharType() const { return WCharType; }
166 IntType getWIntType() const { return WIntType; }
167 IntType getChar16Type() const { return Char16Type; }
168 IntType getChar32Type() const { return Char32Type; }
169 IntType getInt64Type() const { return Int64Type; }
170 IntType getSigAtomicType() const { return SigAtomicType; }
173 /// getTypeWidth - Return the width (in bits) of the specified integer type
174 /// enum. For example, SignedInt -> getIntWidth().
175 unsigned getTypeWidth(IntType T) const;
177 /// getTypeAlign - Return the alignment (in bits) of the specified integer
178 /// type enum. For example, SignedInt -> getIntAlign().
179 unsigned getTypeAlign(IntType T) const;
181 /// isTypeSigned - Return whether an integer types is signed. Returns true if
182 /// the type is signed; false otherwise.
183 static bool isTypeSigned(IntType T);
185 /// getPointerWidth - Return the width of pointers on this target, for the
186 /// specified address space.
187 uint64_t getPointerWidth(unsigned AddrSpace) const {
188 return AddrSpace == 0 ? PointerWidth : getPointerWidthV(AddrSpace);
190 uint64_t getPointerAlign(unsigned AddrSpace) const {
191 return AddrSpace == 0 ? PointerAlign : getPointerAlignV(AddrSpace);
194 /// getBoolWidth/Align - Return the size of '_Bool' and C++ 'bool' for this
196 unsigned getBoolWidth() const { return BoolWidth; }
197 unsigned getBoolAlign() const { return BoolAlign; }
199 unsigned getCharWidth() const { return 8; } // FIXME
200 unsigned getCharAlign() const { return 8; } // FIXME
202 /// getShortWidth/Align - Return the size of 'signed short' and
203 /// 'unsigned short' for this target, in bits.
204 unsigned getShortWidth() const { return 16; } // FIXME
205 unsigned getShortAlign() const { return 16; } // FIXME
207 /// getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for
208 /// this target, in bits.
209 unsigned getIntWidth() const { return IntWidth; }
210 unsigned getIntAlign() const { return IntAlign; }
212 /// getLongWidth/Align - Return the size of 'signed long' and 'unsigned long'
213 /// for this target, in bits.
214 unsigned getLongWidth() const { return LongWidth; }
215 unsigned getLongAlign() const { return LongAlign; }
217 /// getLongLongWidth/Align - Return the size of 'signed long long' and
218 /// 'unsigned long long' for this target, in bits.
219 unsigned getLongLongWidth() const { return LongLongWidth; }
220 unsigned getLongLongAlign() const { return LongLongAlign; }
222 /// getSuitableAlign - Return the alignment that is suitable for storing any
223 /// object with a fundamental alignment requirement.
224 unsigned getSuitableAlign() const { return SuitableAlign; }
226 /// getWCharWidth/Align - Return the size of 'wchar_t' for this target, in
228 unsigned getWCharWidth() const { return getTypeWidth(WCharType); }
229 unsigned getWCharAlign() const { return getTypeAlign(WCharType); }
231 /// getChar16Width/Align - Return the size of 'char16_t' for this target, in
233 unsigned getChar16Width() const { return getTypeWidth(Char16Type); }
234 unsigned getChar16Align() const { return getTypeAlign(Char16Type); }
236 /// getChar32Width/Align - Return the size of 'char32_t' for this target, in
238 unsigned getChar32Width() const { return getTypeWidth(Char32Type); }
239 unsigned getChar32Align() const { return getTypeAlign(Char32Type); }
241 /// getHalfWidth/Align/Format - Return the size/align/format of 'half'.
242 unsigned getHalfWidth() const { return HalfWidth; }
243 unsigned getHalfAlign() const { return HalfAlign; }
244 const llvm::fltSemantics &getHalfFormat() const { return *HalfFormat; }
246 /// getFloatWidth/Align/Format - Return the size/align/format of 'float'.
247 unsigned getFloatWidth() const { return FloatWidth; }
248 unsigned getFloatAlign() const { return FloatAlign; }
249 const llvm::fltSemantics &getFloatFormat() const { return *FloatFormat; }
251 /// getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
252 unsigned getDoubleWidth() const { return DoubleWidth; }
253 unsigned getDoubleAlign() const { return DoubleAlign; }
254 const llvm::fltSemantics &getDoubleFormat() const { return *DoubleFormat; }
256 /// getLongDoubleWidth/Align/Format - Return the size/align/format of 'long
258 unsigned getLongDoubleWidth() const { return LongDoubleWidth; }
259 unsigned getLongDoubleAlign() const { return LongDoubleAlign; }
260 const llvm::fltSemantics &getLongDoubleFormat() const {
261 return *LongDoubleFormat;
264 /// getFloatEvalMethod - Return the value for the C99 FLT_EVAL_METHOD macro.
265 virtual unsigned getFloatEvalMethod() const { return 0; }
267 // getLargeArrayMinWidth/Align - Return the minimum array size that is
268 // 'large' and its alignment.
269 unsigned getLargeArrayMinWidth() const { return LargeArrayMinWidth; }
270 unsigned getLargeArrayAlign() const { return LargeArrayAlign; }
272 /// getMaxAtomicPromoteWidth - Return the maximum width lock-free atomic
273 /// operation which will ever be supported for the given target
274 unsigned getMaxAtomicPromoteWidth() const { return MaxAtomicPromoteWidth; }
275 /// getMaxAtomicInlineWidth - Return the maximum width lock-free atomic
276 /// operation which can be inlined given the supported features of the
278 unsigned getMaxAtomicInlineWidth() const { return MaxAtomicInlineWidth; }
280 /// getIntMaxTWidth - Return the size of intmax_t and uintmax_t for this
282 unsigned getIntMaxTWidth() const {
283 return getTypeWidth(IntMaxType);
286 /// getRegisterWidth - Return the "preferred" register width on this target.
287 uint64_t getRegisterWidth() const {
288 // Currently we assume the register width on the target matches the pointer
289 // width, we can introduce a new variable for this if/when some target wants
294 /// getUserLabelPrefix - This returns the default value of the
295 /// __USER_LABEL_PREFIX__ macro, which is the prefix given to user symbols by
296 /// default. On most platforms this is "_", but it is "" on some, and "." on
298 const char *getUserLabelPrefix() const {
299 return UserLabelPrefix;
302 /// MCountName - This returns name of the mcount instrumentation function.
303 const char *getMCountName() const {
307 /// useSignedCharForObjCBool - Check if the Objective-C built-in boolean
308 /// type should be signed char. Otherwise, if this returns false, the
309 /// normal built-in boolean type should also be used for Objective-C.
310 bool useSignedCharForObjCBool() const {
311 return UseSignedCharForObjCBool;
313 void noSignedCharForObjCBool() {
314 UseSignedCharForObjCBool = false;
317 /// useBitFieldTypeAlignment() - Check whether the alignment of bit-field
318 /// types is respected when laying out structures.
319 bool useBitFieldTypeAlignment() const {
320 return UseBitFieldTypeAlignment;
323 /// useZeroLengthBitfieldAlignment() - Check whether zero length bitfields
324 /// should force alignment of the next member.
325 bool useZeroLengthBitfieldAlignment() const {
326 return UseZeroLengthBitfieldAlignment;
329 /// getZeroLengthBitfieldBoundary() - Get the fixed alignment value in bits
330 /// for a member that follows a zero length bitfield.
331 unsigned getZeroLengthBitfieldBoundary() const {
332 return ZeroLengthBitfieldBoundary;
335 /// hasAlignMac68kSupport - Check whether this target support '#pragma options
337 bool hasAlignMac68kSupport() const {
338 return HasAlignMac68kSupport;
341 /// getTypeName - Return the user string for the specified integer type enum.
342 /// For example, SignedShort -> "short".
343 static const char *getTypeName(IntType T);
345 /// getTypeConstantSuffix - Return the constant suffix for the specified
346 /// integer type enum. For example, SignedLong -> "L".
347 static const char *getTypeConstantSuffix(IntType T);
349 /// \brief Check whether the given real type should use the "fpret" flavor of
350 /// Obj-C message passing on this target.
351 bool useObjCFPRetForRealType(RealType T) const {
352 return RealTypeUsesObjCFPRet & (1 << T);
355 /// \brief Check whether _Complex long double should use the "fp2ret" flavor
356 /// of Obj-C message passing on this target.
357 bool useObjCFP2RetForComplexLongDouble() const {
358 return ComplexLongDoubleUsesFP2Ret;
361 ///===---- Other target property query methods --------------------------===//
363 /// getTargetDefines - Appends the target-specific #define values for this
364 /// target set to the specified buffer.
365 virtual void getTargetDefines(const LangOptions &Opts,
366 MacroBuilder &Builder) const = 0;
369 /// getTargetBuiltins - Return information about target-specific builtins for
370 /// the current primary target, and info about which builtins are non-portable
371 /// across the current set of primary and secondary targets.
372 virtual void getTargetBuiltins(const Builtin::Info *&Records,
373 unsigned &NumRecords) const = 0;
375 /// isCLZForZeroUndef - The __builtin_clz* and __builtin_ctz* built-in
376 /// functions are specified to have undefined results for zero inputs, but
377 /// on targets that support these operations in a way that provides
378 /// well-defined results for zero without loss of performance, it is a good
379 /// idea to avoid optimizing based on that undef behavior.
380 virtual bool isCLZForZeroUndef() const { return true; }
382 /// getVAListDeclaration - Return the declaration to use for
383 /// __builtin_va_list, which is target-specific.
384 virtual const char *getVAListDeclaration() const = 0;
386 /// isValidClobber - Returns whether the passed in string is
387 /// a valid clobber in an inline asm statement. This is used by
389 bool isValidClobber(StringRef Name) const;
391 /// isValidGCCRegisterName - Returns whether the passed in string
392 /// is a valid register name according to GCC. This is used by Sema for
393 /// inline asm statements.
394 bool isValidGCCRegisterName(StringRef Name) const;
396 // getNormalizedGCCRegisterName - Returns the "normalized" GCC register name.
397 // For example, on x86 it will return "ax" when "eax" is passed in.
398 StringRef getNormalizedGCCRegisterName(StringRef Name) const;
400 struct ConstraintInfo {
403 CI_AllowsMemory = 0x01,
404 CI_AllowsRegister = 0x02,
405 CI_ReadWrite = 0x04, // "+r" output constraint (read and write).
406 CI_HasMatchingInput = 0x08 // This output operand has a matching input.
411 std::string ConstraintStr; // constraint: "=rm"
412 std::string Name; // Operand name: [foo] with no []'s.
414 ConstraintInfo(StringRef ConstraintStr, StringRef Name)
415 : Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()),
418 const std::string &getConstraintStr() const { return ConstraintStr; }
419 const std::string &getName() const { return Name; }
420 bool isReadWrite() const { return (Flags & CI_ReadWrite) != 0; }
421 bool allowsRegister() const { return (Flags & CI_AllowsRegister) != 0; }
422 bool allowsMemory() const { return (Flags & CI_AllowsMemory) != 0; }
424 /// hasMatchingInput - Return true if this output operand has a matching
425 /// (tied) input operand.
426 bool hasMatchingInput() const { return (Flags & CI_HasMatchingInput) != 0; }
428 /// hasTiedOperand() - Return true if this input operand is a matching
429 /// constraint that ties it to an output operand. If this returns true,
430 /// then getTiedOperand will indicate which output operand this is tied to.
431 bool hasTiedOperand() const { return TiedOperand != -1; }
432 unsigned getTiedOperand() const {
433 assert(hasTiedOperand() && "Has no tied operand!");
434 return (unsigned)TiedOperand;
437 void setIsReadWrite() { Flags |= CI_ReadWrite; }
438 void setAllowsMemory() { Flags |= CI_AllowsMemory; }
439 void setAllowsRegister() { Flags |= CI_AllowsRegister; }
440 void setHasMatchingInput() { Flags |= CI_HasMatchingInput; }
442 /// setTiedOperand - Indicate that this is an input operand that is tied to
443 /// the specified output operand. Copy over the various constraint
444 /// information from the output.
445 void setTiedOperand(unsigned N, ConstraintInfo &Output) {
446 Output.setHasMatchingInput();
447 Flags = Output.Flags;
449 // Don't copy Name or constraint string.
453 // validateOutputConstraint, validateInputConstraint - Checks that
454 // a constraint is valid and provides information about it.
455 // FIXME: These should return a real error instead of just true/false.
456 bool validateOutputConstraint(ConstraintInfo &Info) const;
457 bool validateInputConstraint(ConstraintInfo *OutputConstraints,
459 ConstraintInfo &info) const;
460 bool resolveSymbolicName(const char *&Name,
461 ConstraintInfo *OutputConstraints,
462 unsigned NumOutputs, unsigned &Index) const;
464 // Constraint parm will be left pointing at the last character of
465 // the constraint. In practice, it won't be changed unless the
466 // constraint is longer than one character.
467 virtual std::string convertConstraint(const char *&Constraint) const {
468 // 'p' defaults to 'r', but can be overridden by targets.
469 if (*Constraint == 'p')
470 return std::string("r");
471 return std::string(1, *Constraint);
474 // Returns a string of target-specific clobbers, in LLVM format.
475 virtual const char *getClobbers() const = 0;
478 /// getTriple - Return the target triple of the primary target.
479 const llvm::Triple &getTriple() const {
483 const char *getTargetDescription() const {
484 return DescriptionString;
488 const char * const Aliases[5];
489 const char * const Register;
493 const char * const Names[5];
494 const unsigned RegNum;
497 /// hasProtectedVisibility - Does this target support "protected"
500 /// Any target which dynamic libraries will naturally support
501 /// something like "default" (meaning that the symbol is visible
502 /// outside this shared object) and "hidden" (meaning that it isn't)
503 /// visibilities, but "protected" is really an ELF-specific concept
504 /// with wierd semantics designed around the convenience of dynamic
505 /// linker implementations. Which is not to suggest that there's
506 /// consistent target-independent semantics for "default" visibility
507 /// either; the entire thing is pretty badly mangled.
508 virtual bool hasProtectedVisibility() const { return true; }
510 virtual bool useGlobalsForAutomaticVariables() const { return false; }
512 /// getCFStringSection - Return the section to use for CFString
513 /// literals, or 0 if no special section is used.
514 virtual const char *getCFStringSection() const {
515 return "__DATA,__cfstring";
518 /// getNSStringSection - Return the section to use for NSString
519 /// literals, or 0 if no special section is used.
520 virtual const char *getNSStringSection() const {
521 return "__OBJC,__cstring_object,regular,no_dead_strip";
524 /// getNSStringNonFragileABISection - Return the section to use for
525 /// NSString literals, or 0 if no special section is used (NonFragile ABI).
526 virtual const char *getNSStringNonFragileABISection() const {
527 return "__DATA, __objc_stringobj, regular, no_dead_strip";
530 /// isValidSectionSpecifier - This is an optional hook that targets can
531 /// implement to perform semantic checking on attribute((section("foo")))
532 /// specifiers. In this case, "foo" is passed in to be checked. If the
533 /// section specifier is invalid, the backend should return a non-empty string
534 /// that indicates the problem.
536 /// This hook is a simple quality of implementation feature to catch errors
537 /// and give good diagnostics in cases when the assembler or code generator
538 /// would otherwise reject the section specifier.
540 virtual std::string isValidSectionSpecifier(StringRef SR) const {
544 /// setForcedLangOptions - Set forced language options.
545 /// Apply changes to the target information with respect to certain
546 /// language options which change the target configuration.
547 virtual void setForcedLangOptions(LangOptions &Opts);
549 /// getDefaultFeatures - Get the default set of target features for the CPU;
550 /// this should include all legal feature strings on the target.
551 virtual void getDefaultFeatures(llvm::StringMap<bool> &Features) const {
554 /// getABI - Get the ABI in use.
555 virtual const char *getABI() const {
559 /// getCXXABI - Get the C++ ABI in use.
560 virtual TargetCXXABI getCXXABI() const {
564 /// setCPU - Target the specific CPU.
566 /// \return - False on error (invalid CPU name).
567 virtual bool setCPU(const std::string &Name) {
571 /// setABI - Use the specific ABI.
573 /// \return - False on error (invalid ABI name).
574 virtual bool setABI(const std::string &Name) {
578 /// setCXXABI - Use this specific C++ ABI.
580 /// \return - False on error (invalid C++ ABI name).
581 bool setCXXABI(const std::string &Name) {
582 static const TargetCXXABI Unknown = static_cast<TargetCXXABI>(-1);
583 TargetCXXABI ABI = llvm::StringSwitch<TargetCXXABI>(Name)
584 .Case("arm", CXXABI_ARM)
585 .Case("itanium", CXXABI_Itanium)
586 .Case("microsoft", CXXABI_Microsoft)
588 if (ABI == Unknown) return false;
589 return setCXXABI(ABI);
592 /// setCXXABI - Set the C++ ABI to be used by this implementation.
594 /// \return - False on error (ABI not valid on this target)
595 virtual bool setCXXABI(TargetCXXABI ABI) {
600 /// setFeatureEnabled - Enable or disable a specific target feature,
601 /// the feature name must be valid.
603 /// \return - False on error (invalid feature name).
604 virtual bool setFeatureEnabled(llvm::StringMap<bool> &Features,
606 bool Enabled) const {
610 /// HandleTargetOptions - Perform initialization based on the user configured
611 /// set of features (e.g., +sse4). The list is guaranteed to have at most one
612 /// entry per feature.
614 /// The target may modify the features list, to change which options are
615 /// passed onwards to the backend.
616 virtual void HandleTargetFeatures(std::vector<std::string> &Features) {
619 /// \brief Determine whether the given target has the given feature.
620 virtual bool hasFeature(StringRef Feature) const {
624 // getRegParmMax - Returns maximal number of args passed in registers.
625 unsigned getRegParmMax() const {
626 assert(RegParmMax < 7 && "RegParmMax value is larger than AST can handle");
630 /// isTLSSupported - Whether the target supports thread-local storage.
631 bool isTLSSupported() const {
635 /// hasNoAsmVariants - Return true if {|} are normal characters in the
636 /// asm string. If this returns false (the default), then {abc|xyz} is syntax
637 /// that says that when compiling for asm variant #0, "abc" should be
638 /// generated, but when compiling for asm variant #1, "xyz" should be
640 bool hasNoAsmVariants() const {
641 return NoAsmVariants;
644 /// getEHDataRegisterNumber - Return the register number that
645 /// __builtin_eh_return_regno would return with the specified argument.
646 virtual int getEHDataRegisterNumber(unsigned RegNo) const {
650 /// getStaticInitSectionSpecifier - Return the section to use for C++ static
651 /// initialization functions.
652 virtual const char *getStaticInitSectionSpecifier() const {
656 const LangAS::Map &getAddressSpaceMap() const {
657 return *AddrSpaceMap;
660 /// \brief Retrieve the name of the platform as it is used in the
661 /// availability attribute.
662 StringRef getPlatformName() const { return PlatformName; }
664 /// \brief Retrieve the minimum desired version of the platform, to
665 /// which the program should be compiled.
666 VersionTuple getPlatformMinVersion() const { return PlatformMinVersion; }
668 bool isBigEndian() const { return BigEndian; }
671 virtual uint64_t getPointerWidthV(unsigned AddrSpace) const {
674 virtual uint64_t getPointerAlignV(unsigned AddrSpace) const {
677 virtual enum IntType getPtrDiffTypeV(unsigned AddrSpace) const {
680 virtual void getGCCRegNames(const char * const *&Names,
681 unsigned &NumNames) const = 0;
682 virtual void getGCCRegAliases(const GCCRegAlias *&Aliases,
683 unsigned &NumAliases) const = 0;
684 virtual void getGCCAddlRegNames(const AddlRegName *&Addl,
685 unsigned &NumAddl) const {
689 virtual bool validateAsmConstraint(const char *&Name,
690 TargetInfo::ConstraintInfo &info) const= 0;
693 } // end namespace clang