aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-02 22:20:04 +0000
committerChris Lattner <sabre@nondot.org>2009-03-02 22:20:04 +0000
commit3daed52a57d03765223021f5f921bdc280c8f3cc (patch)
tree83c32ffe6aa7c2d08542c9ca83eec0b823df62ad /lib/Basic/Targets.cpp
parent16167a6e3f7dfb7ed0babc5e0baab9fd140e959d (diff)
improve compatibility with GCC 4.4, patch by Michel Salim (PR3697)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65884 91177308-0d34-0410-b5e6-96231b3b80d8
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,