echristo accepted this revision.
echristo added a comment.
This revision is now accepted and ready to land.
Ah right. Thanks for looking.
LGTM.
-eric
https://reviews.llvm.org/D33721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://li
fhahn updated this revision to Diff 101427.
fhahn marked an inline comment as done.
fhahn added a comment.
use else if
https://reviews.llvm.org/D33721
Files:
lib/Basic/Targets.cpp
test/CodeGen/arm-target-attr.c
Index: test/CodeGen/arm-target-attr.c
ahatanak added inline comments.
Comment at: lib/Basic/Targets.cpp:5444
+Feature = "-thumb-mode";
+ if (Feature.compare("+thumb") == 0)
+Feature = "+thumb-mode";
This can be "else if".
https://reviews.llvm.org/D33721
_
fhahn added inline comments.
Comment at: lib/Basic/Targets.cpp:5439-5442
+// [-|+]thumb-mode target features respectively.
+std::vector UpdatedFeaturesVec(FeaturesVec);
+for (auto &Feature : UpdatedFeaturesVec) {
+ if (Feature.compare("+arm") == 0)
--
echristo added inline comments.
Comment at: lib/Basic/Targets.cpp:5439-5442
+// [-|+]thumb-mode target features respectively.
+std::vector UpdatedFeaturesVec(FeaturesVec);
+for (auto &Feature : UpdatedFeaturesVec) {
+ if (Feature.compare("+arm") == 0)
---
fhahn updated this revision to Diff 100994.
fhahn added a comment.
Agreed, ARMTargetInfo is a much better place to do the conversion! Moved
attribute conversion to ARMTargetInfo::initFeatureMap. Unfortunately
FeaturesVec is const, so creating a mutable clone seemed the most
straight-forward thi
echristo added inline comments.
Comment at: include/clang/Basic/Attr.td:1790-1794
+// target features respectively.
+if (Feature.compare("arm") == 0)
+ Ret.first.push_back("-thumb-mode");
+else if (Feature.compare("thumb") == 0)
+ Ret.fir
fhahn updated this revision to Diff 100880.
fhahn added a comment.
reworded comment and improved test case to ensure only a single thumb-mode
attribute is added.
https://reviews.llvm.org/D33721
Files:
include/clang/Basic/Attr.td
test/CodeGen/arm-target-attr.c
Index: test/CodeGen/arm-targ
javed.absar added a comment.
Comment at: include/clang/Basic/Attr.td:1774
+
+// Convert GNU target names for arm and thumb to thumb-mode target
+// feature.
Would this be a more accurate comment:
"...arm and thumb to thumb-mode" => "arm and th
fhahn created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.
This patch adds support for the target("arm") and target("thumb")
attributes, which can be used to force the compiler to generated ARM or
Thumb code for a function.
In LLVM, ARM or Thumb code generation c
10 matches
Mail list logo