[PATCH] Add sparc_le architecture (little-endian 32-bit Sparc).
Douglas Katzman
dougk at google.com
Mon Apr 27 12:02:32 PDT 2015
will upload new patch with clang-format-diff. also explained the use of temp vars for '=='
================
Comment at: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp:224
@@ +223,3 @@
+ bool isLittleEndian() const {
+ StringRef name = TheTarget.getName();
+ return name == "sparcel";
----------------
echristo wrote:
> No need for a temporary here?
It was cargo-cultism based on the example above.
Without the temps you have to convert the LHS to a StringRef by hand because getName() returns char* and == would compare pointers. See if you like it.
http://reviews.llvm.org/D8741
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list