[PATCH] D26564: Use PIC relocation mode by default for PowerPC64 ELF

Ehsan Amiri via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 09:57:45 PST 2016


amehsan added inline comments.


================
Comment at: lib/Driver/ToolChains.cpp:2799-2807
+  switch (getArch()) {
+  case llvm::Triple::x86_64:
+    return getTriple().isOSWindows();
+  case llvm::Triple::ppc64:
+  case llvm::Triple::ppc64le:
+    return !getTriple().isOSBinFormatMachO() && !getTriple().isMacOSX();
+  default:
----------------
This is a minor nit. Almost any switch statement that I have come across in LLVM code, has default in the very beginning instead of the end. At least for the sake of consistency this is better to change here. (The reason that I have heard for it, is readability for large switch statements. But in the codebase, even stmts of this size, have default first).


https://reviews.llvm.org/D26564





More information about the cfe-commits mailing list