[cfe-commits] [PATCH] Support MIPS n32 ABI in the Clang driver

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Oct 11 08:23:59 PDT 2012

On 11 October 2012 10:43, Simon Atanasyan <satanasyan at mips.com> wrote:
> Hi,
> MIPS N32 ABI is a minor variation of the 64-bit MIPS ABI. The attached
> patch brings support for N32 ABI to the Clang driver. It builds
> correct library/object files paths and passes appropriate command line
> options to the linker if user provides -mabi=n32 option.
> Please review the patch.

+      StringRef MultiarchSuffix = ::getMultiarchSuffix(TargetArch, Args);

Why the ::?

+// FIXME: There is the same routine in the Tools.cpp.
+static bool hasMipsN32ABIArg(const ArgList &Args) {
+  Arg *A = Args.getLastArg(options::OPT_mabi_EQ);
+  return A && (A->getValue(Args) == StringRef("n32"));

Would making it a method of Generic_GCC fix this?

Why have you moved getMultilibDir? It makes the patch harder to read.

> --
> Simon


More information about the cfe-commits mailing list