diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-26 07:16:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-26 07:16:29 +0000 |
commit | 44def070435a2b5d67f0534f7a3a85a7389d60f2 (patch) | |
tree | ad98260329c0c7d84376df4dfb481471b98935de /lib/Basic/Targets.cpp | |
parent | e60ee1d46aac435154682f4ebba724f24d4b0184 (diff) |
change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index cb74001078..98f6dc1af0 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -280,14 +280,14 @@ public: virtual void getGCCRegAliases(const GCCRegAlias *&Aliases, unsigned &NumAliases) const; virtual bool validateAsmConstraint(const char *&Name, - TargetInfo::ConstraintInfo &info) const { + TargetInfo::ConstraintInfo &Info) const { switch (*Name) { default: return false; case 'O': // Zero return true; case 'b': // Base register case 'f': // Floating point register - info = (TargetInfo::ConstraintInfo)(info|TargetInfo::CI_AllowsRegister); + Info.setAllowsRegister(); return true; } } @@ -638,7 +638,7 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, bool X86TargetInfo::validateAsmConstraint(const char *&Name, - TargetInfo::ConstraintInfo &info) const { + TargetInfo::ConstraintInfo &Info) const { switch (*Name) { default: return false; case 'a': // eax. @@ -660,7 +660,7 @@ X86TargetInfo::validateAsmConstraint(const char *&Name, // x86_64 instructions. case 'N': // unsigned 8-bit integer constant for use with in and out // instructions. - info = (TargetInfo::ConstraintInfo)(info|TargetInfo::CI_AllowsRegister); + Info.setAllowsRegister(); return true; } } @@ -997,7 +997,7 @@ public: NumAliases = 0; } virtual bool validateAsmConstraint(const char *&Name, - TargetInfo::ConstraintInfo &info) const { + TargetInfo::ConstraintInfo &Info) const { // FIXME: Check if this is complete switch (*Name) { default: @@ -1005,7 +1005,7 @@ public: case 'h': // r8-r15 case 'w': // VFP Floating point register single precision case 'P': // VFP Floating point register double precision - info = (TargetInfo::ConstraintInfo)(info|TargetInfo::CI_AllowsRegister); + Info.setAllowsRegister(); return true; } return false; |