[PATCH] Implementation of R_ARM_TARGET1

Rui Ueyama ruiu at google.com
Tue Mar 31 11:27:18 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Driver/GnuLdDriver.cpp:547
@@ +546,3 @@
+  // Process ELF/ARM specific options
+  bool hasArmTarget1Rel = parsedArgs->hasArg(OPT_arm_target1_rel),
+       hasArmTarget1Abs = parsedArgs->hasArg(OPT_arm_target1_abs);
----------------
Instead of defining two local variables in one statement, split them into two statements. It's what we usually do in LLVM.

================
Comment at: lib/Driver/GnuLdDriver.cpp:551
@@ +550,3 @@
+    if (triple.getArch() == llvm::Triple::arm &&
+        triple.getObjectFormat() == llvm::Triple::ELF) {
+      if (hasArmTarget1Rel && hasArmTarget1Abs) {
----------------
In this file we can safely assume that we are handling ELF, so you can remove this line.

================
Comment at: lib/Driver/GnuLdDriver.cpp:559
@@ +558,3 @@
+    } else {
+      if (parsedArgs->hasArg(OPT_arm_target1_rel))
+        diag << "warning: ignoring unsupported ARM/ELF specific argument: "
----------------
Use hasArmTarget1Rel instead.

================
Comment at: lib/Driver/GnuLdDriver.cpp:562
@@ +561,3 @@
+             << "--arm-target1-rel\n";
+      if (parsedArgs->hasArg(OPT_arm_target1_abs))
+        diag << "warning: ignoring unsupported ARM/ELF specific argument: "
----------------
Use hasArmTarget1Abs instead.

http://reviews.llvm.org/D8707

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list