[PATCH] D34878: [ARM] Option for reading thread pointer from coprocessor register

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 10:58:27 PDT 2017


bruno added inline comments.


================
Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:136
+    if (ThreadPointer == ReadTPMode::Invalid &&
+        !StringRef(A->getValue()).empty()) {
+      D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args);
----------------
What happens if you pass an empty "-mtp="  to the driver? Will it silently assume soft? Shouldn't it be an error too?


================
Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:138
+      D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args);
+      ThreadPointer = ReadTPMode::Soft;
+    }
----------------
Won't this assignment be covered by the code below anyway? Maybe remove it?


https://reviews.llvm.org/D34878





More information about the cfe-commits mailing list