echristo added inline comments.

================
Comment at: clang/lib/CodeGen/CGExpr.cpp:2917
+                                CodeGenFunction &CGF, llvm::Function *F,
+                                bool ForceThumb) {
+  StringRef TargetCPU = CGF.getTarget().getTargetOpts().CPU;
----------------
I don't think we should be force setting thumb anywhere, it should be handled 
on a function by function basis the way we do all of the target attribute stuff.


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:2926-2935
+  Features.reserve(DefaultFeatures.size() + ForceThumb);
+  if (ForceThumb && (Triple.isARM() || Triple.isThumb())) {
+    for (auto &S : DefaultFeatures)
+      if (S != "-thumb-mode" && S != "+thumb-mode")
+        Features.push_back(S);
+    Features.push_back("+thumb-mode");
+  } else {
----------------
All of this should be handled in lib/Basic/Targets/ARM.cpp 
ARMTargetInfo::initFeatureMap ?


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:2961-2963
+  // attributes as SetLLVMFunctionAttributes sets. In particular, __cfi_check
+  // must use the default calling convention for the platform. ABI-changing
+  // flags like -mhard-float should not affect __cfi_check.
----------------
This is odd. Can you explain this a bit more?


https://reviews.llvm.org/D37656



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to