aboutsummaryrefslogtreecommitdiff
path: root/Driver/Targets.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2007-12-08 19:32:57 +0000
committerAnders Carlsson <andersca@mac.com>2007-12-08 19:32:57 +0000
commit44fe49c9ccf29b8e9b66ce1f2375be6ec591c03c (patch)
tree914b45869024ea5d60e881e1dfba5e9582cb3317 /Driver/Targets.cpp
parentc92942c5fe8330c8c090c84ecde31ee8240c95bb (diff)
Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/Targets.cpp')
-rw-r--r--Driver/Targets.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/Driver/Targets.cpp b/Driver/Targets.cpp
index 63df5d48c8..400090871c 100644
--- a/Driver/Targets.cpp
+++ b/Driver/Targets.cpp
@@ -402,6 +402,10 @@ namespace PPC {
return 0;
}
+ const char *getTargetPrefix() {
+ return "ppc";
+ }
+
} // End namespace PPC
@@ -480,6 +484,10 @@ namespace X86 {
return "~{dirflag},~{fpsr},~{flags}";
}
+ const char *getTargetPrefix() {
+ return "x86";
+ }
+
} // End namespace X86
//===----------------------------------------------------------------------===//
@@ -503,6 +511,9 @@ public:
virtual const char *getVAListDeclaration() const {
return getPPCVAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return PPC::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
PPC::getGCCRegNames(Names, NumNames);
@@ -537,6 +548,9 @@ public:
virtual const char *getVAListDeclaration() const {
return getPPCVAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return PPC::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
PPC::getGCCRegNames(Names, NumNames);
@@ -571,6 +585,9 @@ public:
virtual const char *getVAListDeclaration() const {
return getI386VAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return X86::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
X86::getGCCRegNames(Names, NumNames);
@@ -605,6 +622,9 @@ public:
virtual const char *getVAListDeclaration() const {
return getX86_64VAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return X86::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
X86::getGCCRegNames(Names, NumNames);
@@ -643,6 +663,9 @@ public:
virtual const char *getVAListDeclaration() const {
return getI386VAListDeclaration();
}
+ virtual const char *getTargetPrefix() const {
+ return X86::getTargetPrefix();
+ }
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const {
X86::getGCCRegNames(Names, NumNames);