[PATCH] D13055: [ELF2] Handle -m option

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 06:29:05 PDT 2015


rafael added inline comments.

================
Comment at: ELF/Config.h:26
@@ +25,3 @@
+  }
+  bool IsBE() const {
+    return ElfKind == ELF64BEKind || ElfKind == ELF32BEKind;
----------------
git-clang-format the patch.

Function names start with a lowercase letter.

================
Comment at: ELF/Driver.cpp:88
@@ +87,3 @@
+                                                      bool &TargetDefined) {
+  std::unique_ptr<ELFFileBase> f = createELFFile<T>(MB);
+  const ELFKind ElfKind = f->getELFKind();
----------------
Variable names start with an upper case letter.

================
Comment at: ELF/Driver.cpp:96
@@ +95,3 @@
+    TargetDefined = true;
+    return f;
+  }
----------------
This fails to build:

Driver.cpp:96:12: error: no viable conversion from returned value of type 'unique_ptr<lld::elf2::ELFFileBase>' to function return type 'unique_ptr<lld::elf2::InputFile>'


================
Comment at: test/elf2/incompatible.s:8
@@ -7,3 +7,3 @@
 // RUN:   FileCheck --check-prefix=A-AND-B %s
-// A-AND-B: a.o is incompatible with {{.*}}b.o
+// A-AND-B: b.o is incompatible with target architecture
 
----------------
That is a regression. When two things are incompatible we should still say what they are. An object file can be incompatible with another or with a -m option.



http://reviews.llvm.org/D13055





More information about the llvm-commits mailing list