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 | d9725f7041bbf092a02cd11667a5a9e234e5aef1 (patch) | |
tree | 7ea889983f863c09c5ad9a64c85511a5668b32ae /clang/lib/Basic/Targets.cpp | |
parent | 8bdbf3628f76ca874e1a0175367ecd5df9f73de3 (diff) | |
download | bcm5719-llvm-d9725f7041bbf092a02cd11667a5a9e234e5aef1.tar.gz bcm5719-llvm-d9725f7041bbf092a02cd11667a5a9e234e5aef1.zip |
change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.
llvm-svn: 70114
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index cb740010780..98f6dc1af0e 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/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; |