aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target/SubtargetFeature.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-05-11 00:30:02 +0000
committerBill Wendling <isanbard@gmail.com>2010-05-11 00:30:02 +0000
commit81043ee5dc4cca470db8d45e080ba0a38efbffc2 (patch)
tree1eb46a731b61748f345af8a66850350ae248fd48 /include/llvm/Target/SubtargetFeature.h
parent31b9c44cc13bb686010cf6bfbeef8745c39939b9 (diff)
The getDefaultSubtargetFeatures method of SubtargetFeature did actually return a
string of features for that target. However LTO was using that string to pass into the "create target machine" stuff. That stuff needed the feature string to be in a particular form. In particular, it needed the CPU specified first and then the attributes. If there isn't a CPU specified, it required it to be blank -- e.g., ",+altivec". Yuck. Modify the getDefaultSubtargetFeatures method to be a non-static member function. For all attributes for a specific subtarget, it will add them in like normal. It will also take a CPU string so that it can satisfy this horrible syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/SubtargetFeature.h')
-rw-r--r--include/llvm/Target/SubtargetFeature.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Target/SubtargetFeature.h b/include/llvm/Target/SubtargetFeature.h
index 38a3cc2fef..45468714a3 100644
--- a/include/llvm/Target/SubtargetFeature.h
+++ b/include/llvm/Target/SubtargetFeature.h
@@ -108,9 +108,10 @@ public:
// Dump feature info.
void dump() const;
- /// Retrieve a formatted string of the default features for
- /// the specified target triple.
- static std::string getDefaultSubtargetFeatures(const Triple &Triple);
+ /// Retrieve a formatted string of the default features for the specified
+ /// target triple.
+ void getDefaultSubtargetFeatures(const std::string &CPU,
+ const Triple& Triple);
};
} // End namespace llvm