aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index ef17d2d342..6973ec51d2 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -497,7 +497,21 @@ public:
virtual const char *getClobbers() const {
return "~{dirflag},~{fpsr},~{flags}";
}
+
+ virtual int HandleTargetOptions(std::string *StrArray, unsigned NumStrs,
+ std::string &ErrorReason);
};
+
+/// HandleTargetOptions - Handle target-specific options like -msse2 and
+/// friends. An array of arguments is passed in: if they are all valid, this
+/// should handle them and return -1. If there is an error, the index of the
+/// invalid argument should be returned along with an optional error string.
+int X86TargetInfo::HandleTargetOptions(std::string *StrArray, unsigned NumStrs,
+ std::string &ErrorReason) {
+ if (NumStrs == 0)
+ return -1;
+ return 0;
+}
bool
X86TargetInfo::validateAsmConstraint(const char *&Name,