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

Kristof Beyls via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 05:28:32 PDT 2017


kristof.beyls added inline comments.


================
Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:137
+  const Driver &D = TC.getDriver();
+  arm::ReadTPMode ThreadPointer = ReadTPMode::Invalid;
+  if (Arg *A =
----------------
With the new version of the code, there's no need to have a ThreadPointer variable declared here; it can be declared inside the if statement below instead.


================
Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:149-150
+    else
+      D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args);
+  }
+  return ReadTPMode::Soft;
----------------
a return ReadTPMode::Invalid is missing here.


https://reviews.llvm.org/D34878





More information about the cfe-commits mailing list