[PATCH] D14662: [ARM] Pass architecture to TargetParser defaulting to cope with API change
Bradley Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 09:36:29 PST 2015
bsmith created this revision.
bsmith added a reviewer: rengolin.
bsmith added a subscriber: cfe-commits.
bsmith set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.
The TargetParser API to get the default FPU and extensions will change in D14661, this is so it can fall back to the architecture in case of a generic CPU. This patch adjusts calls to the changed functions to pass in the correct information.
Repository:
rL LLVM
http://reviews.llvm.org/D14662
Files:
lib/Basic/Targets.cpp
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -4501,13 +4501,14 @@
const std::vector<std::string> &FeaturesVec) const override {
std::vector<const char*> TargetFeatures;
+ unsigned Arch = llvm::ARM::parseArch(getTriple().getArchName());
// get default FPU features
- unsigned FPUKind = llvm::ARM::getDefaultFPU(CPU);
+ unsigned FPUKind = llvm::ARM::getDefaultFPU(CPU, Arch);
llvm::ARM::getFPUFeatures(FPUKind, TargetFeatures);
// get default Extension features
- unsigned Extensions = llvm::ARM::getDefaultExtensions(CPU);
+ unsigned Extensions = llvm::ARM::getDefaultExtensions(CPU, Arch);
llvm::ARM::getExtensionFeatures(Extensions, TargetFeatures);
for (const char *Feature : TargetFeatures)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14662.40160.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151113/d555e502/attachment.bin>
More information about the cfe-commits
mailing list