TargetInfo.h revision d6471f7c1921c7802804ce3ff6fe9768310f72b9
1//===--- TargetInfo.h - Expose information about the target -----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines the TargetInfo interface. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_CLANG_BASIC_TARGETINFO_H 15#define LLVM_CLANG_BASIC_TARGETINFO_H 16 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" 26#include <cassert> 27#include <vector> 28#include <string> 29 30namespace llvm { 31struct fltSemantics; 32} 33 34namespace clang { 35class DiagnosticsEngine; 36class LangOptions; 37class MacroBuilder; 38class SourceLocation; 39class SourceManager; 40class TargetOptions; 41 42namespace Builtin { struct Info; } 43 44/// TargetCXXABI - The types of C++ ABIs for which we can generate code. 45enum TargetCXXABI { 46 /// The generic ("Itanium") C++ ABI, documented at: 47 /// http://www.codesourcery.com/public/cxx-abi/ 48 CXXABI_Itanium, 49 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 54 CXXABI_ARM, 55 56 /// The Visual Studio ABI. Only scattered official documentation exists. 57 CXXABI_Microsoft 58}; 59 60/// TargetInfo - This class exposes information about the current target. 61/// 62class TargetInfo : public llvm::RefCountedBase<TargetInfo> { 63 llvm::Triple Triple; 64protected: 65 // Target values set by the ctor of the actual target implementation. Default 66 // values are specified by the TargetInfo constructor. 67 bool TLSSupported; 68 bool NoAsmVariants; // True if {|} are normal characters. 69 unsigned char PointerWidth, PointerAlign; 70 unsigned char BoolWidth, BoolAlign; 71 unsigned char IntWidth, IntAlign; 72 unsigned char FloatWidth, FloatAlign; 73 unsigned char DoubleWidth, DoubleAlign; 74 unsigned char LongDoubleWidth, LongDoubleAlign; 75 unsigned char LargeArrayMinWidth, LargeArrayAlign; 76 unsigned char LongWidth, LongAlign; 77 unsigned char LongLongWidth, LongLongAlign; 78 const char *DescriptionString; 79 const char *UserLabelPrefix; 80 const char *MCountName; 81 const llvm::fltSemantics *FloatFormat, *DoubleFormat, *LongDoubleFormat; 82 unsigned char RegParmMax, SSERegParmMax; 83 TargetCXXABI CXXABI; 84 const LangAS::Map *AddrSpaceMap; 85 86 mutable StringRef PlatformName; 87 mutable VersionTuple PlatformMinVersion; 88 89 unsigned HasAlignMac68kSupport : 1; 90 unsigned RealTypeUsesObjCFPRet : 3; 91 92 // TargetInfo Constructor. Default initializes all fields. 93 TargetInfo(const std::string &T); 94 95public: 96 /// CreateTargetInfo - Construct a target for the given options. 97 /// 98 /// \param Opts - The options to use to initialize the target. The target may 99 /// modify the options to canonicalize the target feature information to match 100 /// what the backend expects. 101 static TargetInfo* CreateTargetInfo(DiagnosticsEngine &Diags, 102 TargetOptions &Opts); 103 104 virtual ~TargetInfo(); 105 106 ///===---- Target Data Type Query Methods -------------------------------===// 107 enum IntType { 108 NoInt = 0, 109 SignedShort, 110 UnsignedShort, 111 SignedInt, 112 UnsignedInt, 113 SignedLong, 114 UnsignedLong, 115 SignedLongLong, 116 UnsignedLongLong 117 }; 118 119 enum RealType { 120 Float = 0, 121 Double, 122 LongDouble 123 }; 124 125protected: 126 IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType, 127 WIntType, Char16Type, Char32Type, Int64Type, SigAtomicType; 128 129 /// Control whether the alignment of bit-field types is respected when laying 130 /// out structures. If true, then the alignment of the bit-field type will be 131 /// used to (a) impact the alignment of the containing structure, and (b) 132 /// ensure that the individual bit-field will not straddle an alignment 133 /// boundary. 134 unsigned UseBitFieldTypeAlignment : 1; 135 136 /// Control whether zero length bitfields (e.g., int : 0;) force alignment of 137 /// the next bitfield. If the alignment of the zero length bitfield is 138 /// greater than the member that follows it, `bar', `bar' will be aligned as 139 /// the type of the zero-length bitfield. 140 unsigned UseZeroLengthBitfieldAlignment : 1; 141 142 /// If non-zero, specifies a fixed alignment value for bitfields that follow 143 /// zero length bitfield, regardless of the zero length bitfield type. 144 unsigned ZeroLengthBitfieldBoundary; 145 146public: 147 IntType getSizeType() const { return SizeType; } 148 IntType getIntMaxType() const { return IntMaxType; } 149 IntType getUIntMaxType() const { return UIntMaxType; } 150 IntType getPtrDiffType(unsigned AddrSpace) const { 151 return AddrSpace == 0 ? PtrDiffType : getPtrDiffTypeV(AddrSpace); 152 } 153 IntType getIntPtrType() const { return IntPtrType; } 154 IntType getWCharType() const { return WCharType; } 155 IntType getWIntType() const { return WIntType; } 156 IntType getChar16Type() const { return Char16Type; } 157 IntType getChar32Type() const { return Char32Type; } 158 IntType getInt64Type() const { return Int64Type; } 159 IntType getSigAtomicType() const { return SigAtomicType; } 160 161 162 /// getTypeWidth - Return the width (in bits) of the specified integer type 163 /// enum. For example, SignedInt -> getIntWidth(). 164 unsigned getTypeWidth(IntType T) const; 165 166 /// getTypeAlign - Return the alignment (in bits) of the specified integer 167 /// type enum. For example, SignedInt -> getIntAlign(). 168 unsigned getTypeAlign(IntType T) const; 169 170 /// isTypeSigned - Return whether an integer types is signed. Returns true if 171 /// the type is signed; false otherwise. 172 static bool isTypeSigned(IntType T); 173 174 /// getPointerWidth - Return the width of pointers on this target, for the 175 /// specified address space. 176 uint64_t getPointerWidth(unsigned AddrSpace) const { 177 return AddrSpace == 0 ? PointerWidth : getPointerWidthV(AddrSpace); 178 } 179 uint64_t getPointerAlign(unsigned AddrSpace) const { 180 return AddrSpace == 0 ? PointerAlign : getPointerAlignV(AddrSpace); 181 } 182 183 /// getBoolWidth/Align - Return the size of '_Bool' and C++ 'bool' for this 184 /// target, in bits. 185 unsigned getBoolWidth() const { return BoolWidth; } 186 unsigned getBoolAlign() const { return BoolAlign; } 187 188 unsigned getCharWidth() const { return 8; } // FIXME 189 unsigned getCharAlign() const { return 8; } // FIXME 190 191 /// getShortWidth/Align - Return the size of 'signed short' and 192 /// 'unsigned short' for this target, in bits. 193 unsigned getShortWidth() const { return 16; } // FIXME 194 unsigned getShortAlign() const { return 16; } // FIXME 195 196 /// getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for 197 /// this target, in bits. 198 unsigned getIntWidth() const { return IntWidth; } 199 unsigned getIntAlign() const { return IntAlign; } 200 201 /// getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' 202 /// for this target, in bits. 203 unsigned getLongWidth() const { return LongWidth; } 204 unsigned getLongAlign() const { return LongAlign; } 205 206 /// getLongLongWidth/Align - Return the size of 'signed long long' and 207 /// 'unsigned long long' for this target, in bits. 208 unsigned getLongLongWidth() const { return LongLongWidth; } 209 unsigned getLongLongAlign() const { return LongLongAlign; } 210 211 /// getWCharWidth/Align - Return the size of 'wchar_t' for this target, in 212 /// bits. 213 unsigned getWCharWidth() const { return getTypeWidth(WCharType); } 214 unsigned getWCharAlign() const { return getTypeAlign(WCharType); } 215 216 /// getChar16Width/Align - Return the size of 'char16_t' for this target, in 217 /// bits. 218 unsigned getChar16Width() const { return getTypeWidth(Char16Type); } 219 unsigned getChar16Align() const { return getTypeAlign(Char16Type); } 220 221 /// getChar32Width/Align - Return the size of 'char32_t' for this target, in 222 /// bits. 223 unsigned getChar32Width() const { return getTypeWidth(Char32Type); } 224 unsigned getChar32Align() const { return getTypeAlign(Char32Type); } 225 226 /// getFloatWidth/Align/Format - Return the size/align/format of 'float'. 227 unsigned getFloatWidth() const { return FloatWidth; } 228 unsigned getFloatAlign() const { return FloatAlign; } 229 const llvm::fltSemantics &getFloatFormat() const { return *FloatFormat; } 230 231 /// getDoubleWidth/Align/Format - Return the size/align/format of 'double'. 232 unsigned getDoubleWidth() const { return DoubleWidth; } 233 unsigned getDoubleAlign() const { return DoubleAlign; } 234 const llvm::fltSemantics &getDoubleFormat() const { return *DoubleFormat; } 235 236 /// getLongDoubleWidth/Align/Format - Return the size/align/format of 'long 237 /// double'. 238 unsigned getLongDoubleWidth() const { return LongDoubleWidth; } 239 unsigned getLongDoubleAlign() const { return LongDoubleAlign; } 240 const llvm::fltSemantics &getLongDoubleFormat() const { 241 return *LongDoubleFormat; 242 } 243 244 // getLargeArrayMinWidth/Align - Return the minimum array size that is 245 // 'large' and its alignment. 246 unsigned getLargeArrayMinWidth() const { return LargeArrayMinWidth; } 247 unsigned getLargeArrayAlign() const { return LargeArrayAlign; } 248 249 /// getIntMaxTWidth - Return the size of intmax_t and uintmax_t for this 250 /// target, in bits. 251 unsigned getIntMaxTWidth() const { 252 return getTypeWidth(IntMaxType); 253 } 254 255 /// getRegisterWidth - Return the "preferred" register width on this target. 256 uint64_t getRegisterWidth() const { 257 // Currently we assume the register width on the target matches the pointer 258 // width, we can introduce a new variable for this if/when some target wants 259 // it. 260 return LongWidth; 261 } 262 263 /// getUserLabelPrefix - This returns the default value of the 264 /// __USER_LABEL_PREFIX__ macro, which is the prefix given to user symbols by 265 /// default. On most platforms this is "_", but it is "" on some, and "." on 266 /// others. 267 const char *getUserLabelPrefix() const { 268 return UserLabelPrefix; 269 } 270 271 /// MCountName - This returns name of the mcount instrumentation function. 272 const char *getMCountName() const { 273 return MCountName; 274 } 275 276 /// useBitFieldTypeAlignment() - Check whether the alignment of bit-field 277 /// types is respected when laying out structures. 278 bool useBitFieldTypeAlignment() const { 279 return UseBitFieldTypeAlignment; 280 } 281 282 /// useZeroLengthBitfieldAlignment() - Check whether zero length bitfields 283 /// should force alignment of the next member. 284 bool useZeroLengthBitfieldAlignment() const { 285 return UseZeroLengthBitfieldAlignment; 286 } 287 288 /// getZeroLengthBitfieldBoundary() - Get the fixed alignment value in bits 289 /// for a member that follows a zero length bitfield. 290 unsigned getZeroLengthBitfieldBoundary() const { 291 return ZeroLengthBitfieldBoundary; 292 } 293 294 /// hasAlignMac68kSupport - Check whether this target support '#pragma options 295 /// align=mac68k'. 296 bool hasAlignMac68kSupport() const { 297 return HasAlignMac68kSupport; 298 } 299 300 /// getTypeName - Return the user string for the specified integer type enum. 301 /// For example, SignedShort -> "short". 302 static const char *getTypeName(IntType T); 303 304 /// getTypeConstantSuffix - Return the constant suffix for the specified 305 /// integer type enum. For example, SignedLong -> "L". 306 static const char *getTypeConstantSuffix(IntType T); 307 308 /// \brief Check whether the given real type should use the "fpret" flavor of 309 /// Obj-C message passing on this target. 310 bool useObjCFPRetForRealType(RealType T) const { 311 return RealTypeUsesObjCFPRet & (1 << T); 312 } 313 314 ///===---- Other target property query methods --------------------------===// 315 316 /// getTargetDefines - Appends the target-specific #define values for this 317 /// target set to the specified buffer. 318 virtual void getTargetDefines(const LangOptions &Opts, 319 MacroBuilder &Builder) const = 0; 320 321 322 /// getTargetBuiltins - Return information about target-specific builtins for 323 /// the current primary target, and info about which builtins are non-portable 324 /// across the current set of primary and secondary targets. 325 virtual void getTargetBuiltins(const Builtin::Info *&Records, 326 unsigned &NumRecords) const = 0; 327 328 /// getVAListDeclaration - Return the declaration to use for 329 /// __builtin_va_list, which is target-specific. 330 virtual const char *getVAListDeclaration() const = 0; 331 332 /// isValidClobber - Returns whether the passed in string is 333 /// a valid clobber in an inline asm statement. This is used by 334 /// Sema. 335 bool isValidClobber(StringRef Name) const; 336 337 /// isValidGCCRegisterName - Returns whether the passed in string 338 /// is a valid register name according to GCC. This is used by Sema for 339 /// inline asm statements. 340 bool isValidGCCRegisterName(StringRef Name) const; 341 342 // getNormalizedGCCRegisterName - Returns the "normalized" GCC register name. 343 // For example, on x86 it will return "ax" when "eax" is passed in. 344 StringRef getNormalizedGCCRegisterName(StringRef Name) const; 345 346 struct ConstraintInfo { 347 enum { 348 CI_None = 0x00, 349 CI_AllowsMemory = 0x01, 350 CI_AllowsRegister = 0x02, 351 CI_ReadWrite = 0x04, // "+r" output constraint (read and write). 352 CI_HasMatchingInput = 0x08 // This output operand has a matching input. 353 }; 354 unsigned Flags; 355 int TiedOperand; 356 357 std::string ConstraintStr; // constraint: "=rm" 358 std::string Name; // Operand name: [foo] with no []'s. 359 public: 360 ConstraintInfo(StringRef ConstraintStr, StringRef Name) 361 : Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()), 362 Name(Name.str()) {} 363 364 const std::string &getConstraintStr() const { return ConstraintStr; } 365 const std::string &getName() const { return Name; } 366 bool isReadWrite() const { return (Flags & CI_ReadWrite) != 0; } 367 bool allowsRegister() const { return (Flags & CI_AllowsRegister) != 0; } 368 bool allowsMemory() const { return (Flags & CI_AllowsMemory) != 0; } 369 370 /// hasMatchingInput - Return true if this output operand has a matching 371 /// (tied) input operand. 372 bool hasMatchingInput() const { return (Flags & CI_HasMatchingInput) != 0; } 373 374 /// hasTiedOperand() - Return true if this input operand is a matching 375 /// constraint that ties it to an output operand. If this returns true, 376 /// then getTiedOperand will indicate which output operand this is tied to. 377 bool hasTiedOperand() const { return TiedOperand != -1; } 378 unsigned getTiedOperand() const { 379 assert(hasTiedOperand() && "Has no tied operand!"); 380 return (unsigned)TiedOperand; 381 } 382 383 void setIsReadWrite() { Flags |= CI_ReadWrite; } 384 void setAllowsMemory() { Flags |= CI_AllowsMemory; } 385 void setAllowsRegister() { Flags |= CI_AllowsRegister; } 386 void setHasMatchingInput() { Flags |= CI_HasMatchingInput; } 387 388 /// setTiedOperand - Indicate that this is an input operand that is tied to 389 /// the specified output operand. Copy over the various constraint 390 /// information from the output. 391 void setTiedOperand(unsigned N, ConstraintInfo &Output) { 392 Output.setHasMatchingInput(); 393 Flags = Output.Flags; 394 TiedOperand = N; 395 // Don't copy Name or constraint string. 396 } 397 }; 398 399 // validateOutputConstraint, validateInputConstraint - Checks that 400 // a constraint is valid and provides information about it. 401 // FIXME: These should return a real error instead of just true/false. 402 bool validateOutputConstraint(ConstraintInfo &Info) const; 403 bool validateInputConstraint(ConstraintInfo *OutputConstraints, 404 unsigned NumOutputs, 405 ConstraintInfo &info) const; 406 bool resolveSymbolicName(const char *&Name, 407 ConstraintInfo *OutputConstraints, 408 unsigned NumOutputs, unsigned &Index) const; 409 410 // Constraint parm will be left pointing at the last character of 411 // the constraint. In practice, it won't be changed unless the 412 // constraint is longer than one character. 413 virtual std::string convertConstraint(const char *&Constraint) const { 414 // 'p' defaults to 'r', but can be overridden by targets. 415 if (*Constraint == 'p') 416 return std::string("r"); 417 return std::string(1, *Constraint); 418 } 419 420 // Returns a string of target-specific clobbers, in LLVM format. 421 virtual const char *getClobbers() const = 0; 422 423 424 /// getTriple - Return the target triple of the primary target. 425 const llvm::Triple &getTriple() const { 426 return Triple; 427 } 428 429 const char *getTargetDescription() const { 430 return DescriptionString; 431 } 432 433 struct GCCRegAlias { 434 const char * const Aliases[5]; 435 const char * const Register; 436 }; 437 438 struct AddlRegName { 439 const char * const Names[5]; 440 const unsigned RegNum; 441 }; 442 443 virtual bool useGlobalsForAutomaticVariables() const { return false; } 444 445 /// getCFStringSection - Return the section to use for CFString 446 /// literals, or 0 if no special section is used. 447 virtual const char *getCFStringSection() const { 448 return "__DATA,__cfstring"; 449 } 450 451 /// getNSStringSection - Return the section to use for NSString 452 /// literals, or 0 if no special section is used. 453 virtual const char *getNSStringSection() const { 454 return "__OBJC,__cstring_object,regular,no_dead_strip"; 455 } 456 457 /// getNSStringNonFragileABISection - Return the section to use for 458 /// NSString literals, or 0 if no special section is used (NonFragile ABI). 459 virtual const char *getNSStringNonFragileABISection() const { 460 return "__DATA, __objc_stringobj, regular, no_dead_strip"; 461 } 462 463 /// isValidSectionSpecifier - This is an optional hook that targets can 464 /// implement to perform semantic checking on attribute((section("foo"))) 465 /// specifiers. In this case, "foo" is passed in to be checked. If the 466 /// section specifier is invalid, the backend should return a non-empty string 467 /// that indicates the problem. 468 /// 469 /// This hook is a simple quality of implementation feature to catch errors 470 /// and give good diagnostics in cases when the assembler or code generator 471 /// would otherwise reject the section specifier. 472 /// 473 virtual std::string isValidSectionSpecifier(StringRef SR) const { 474 return ""; 475 } 476 477 /// setForcedLangOptions - Set forced language options. 478 /// Apply changes to the target information with respect to certain 479 /// language options which change the target configuration. 480 virtual void setForcedLangOptions(LangOptions &Opts); 481 482 /// getDefaultFeatures - Get the default set of target features for 483 /// the \args CPU; this should include all legal feature strings on 484 /// the target. 485 virtual void getDefaultFeatures(const std::string &CPU, 486 llvm::StringMap<bool> &Features) const { 487 } 488 489 /// getABI - Get the ABI in use. 490 virtual const char *getABI() const { 491 return ""; 492 } 493 494 /// getCXXABI - Get the C++ ABI in use. 495 virtual TargetCXXABI getCXXABI() const { 496 return CXXABI; 497 } 498 499 /// setCPU - Target the specific CPU. 500 /// 501 /// \return - False on error (invalid CPU name). 502 // 503 // FIXME: Remove this. 504 virtual bool setCPU(const std::string &Name) { 505 return true; 506 } 507 508 /// setABI - Use the specific ABI. 509 /// 510 /// \return - False on error (invalid ABI name). 511 virtual bool setABI(const std::string &Name) { 512 return false; 513 } 514 515 /// setCXXABI - Use this specific C++ ABI. 516 /// 517 /// \return - False on error (invalid C++ ABI name). 518 bool setCXXABI(const std::string &Name) { 519 static const TargetCXXABI Unknown = static_cast<TargetCXXABI>(-1); 520 TargetCXXABI ABI = llvm::StringSwitch<TargetCXXABI>(Name) 521 .Case("arm", CXXABI_ARM) 522 .Case("itanium", CXXABI_Itanium) 523 .Case("microsoft", CXXABI_Microsoft) 524 .Default(Unknown); 525 if (ABI == Unknown) return false; 526 return setCXXABI(ABI); 527 } 528 529 /// setCXXABI - Set the C++ ABI to be used by this implementation. 530 /// 531 /// \return - False on error (ABI not valid on this target) 532 virtual bool setCXXABI(TargetCXXABI ABI) { 533 CXXABI = ABI; 534 return true; 535 } 536 537 /// setFeatureEnabled - Enable or disable a specific target feature, 538 /// the feature name must be valid. 539 /// 540 /// \return - False on error (invalid feature name). 541 virtual bool setFeatureEnabled(llvm::StringMap<bool> &Features, 542 const std::string &Name, 543 bool Enabled) const { 544 return false; 545 } 546 547 /// HandleTargetOptions - Perform initialization based on the user configured 548 /// set of features (e.g., +sse4). The list is guaranteed to have at most one 549 /// entry per feature. 550 /// 551 /// The target may modify the features list, to change which options are 552 /// passed onwards to the backend. 553 virtual void HandleTargetFeatures(std::vector<std::string> &Features) { 554 } 555 556 // getRegParmMax - Returns maximal number of args passed in registers. 557 unsigned getRegParmMax() const { 558 assert(RegParmMax < 7 && "RegParmMax value is larger than AST can handle"); 559 return RegParmMax; 560 } 561 562 /// isTLSSupported - Whether the target supports thread-local storage. 563 bool isTLSSupported() const { 564 return TLSSupported; 565 } 566 567 /// hasNoAsmVariants - Return true if {|} are normal characters in the 568 /// asm string. If this returns false (the default), then {abc|xyz} is syntax 569 /// that says that when compiling for asm variant #0, "abc" should be 570 /// generated, but when compiling for asm variant #1, "xyz" should be 571 /// generated. 572 bool hasNoAsmVariants() const { 573 return NoAsmVariants; 574 } 575 576 /// getEHDataRegisterNumber - Return the register number that 577 /// __builtin_eh_return_regno would return with the specified argument. 578 virtual int getEHDataRegisterNumber(unsigned RegNo) const { 579 return -1; 580 } 581 582 /// getStaticInitSectionSpecifier - Return the section to use for C++ static 583 /// initialization functions. 584 virtual const char *getStaticInitSectionSpecifier() const { 585 return 0; 586 } 587 588 const LangAS::Map &getAddressSpaceMap() const { 589 return *AddrSpaceMap; 590 } 591 592 /// \brief Retrieve the name of the platform as it is used in the 593 /// availability attribute. 594 StringRef getPlatformName() const { return PlatformName; } 595 596 /// \brief Retrieve the minimum desired version of the platform, to 597 /// which the program should be compiled. 598 VersionTuple getPlatformMinVersion() const { return PlatformMinVersion; } 599 600protected: 601 virtual uint64_t getPointerWidthV(unsigned AddrSpace) const { 602 return PointerWidth; 603 } 604 virtual uint64_t getPointerAlignV(unsigned AddrSpace) const { 605 return PointerAlign; 606 } 607 virtual enum IntType getPtrDiffTypeV(unsigned AddrSpace) const { 608 return PtrDiffType; 609 } 610 virtual void getGCCRegNames(const char * const *&Names, 611 unsigned &NumNames) const = 0; 612 virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, 613 unsigned &NumAliases) const = 0; 614 virtual void getGCCAddlRegNames(const AddlRegName *&Addl, 615 unsigned &NumAddl) const { 616 Addl = 0; 617 NumAddl = 0; 618 } 619 virtual bool validateAsmConstraint(const char *&Name, 620 TargetInfo::ConstraintInfo &info) const= 0; 621}; 622 623} // end namespace clang 624 625#endif 626