From: Rafael Espindola Date: Tue, 21 Jun 2016 20:09:22 +0000 (+0000) Subject: Add back some dead code. X-Git-Tag: android-x86-7.1-r4~31453 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6e37dd76f66dcf057927a32b3c5b1977369359da;p=android-x86%2Fexternal-llvm.git Add back some dead code. It was there just to avoid warnings. Add a LLVM_ATTRIBUTE_UNUSED attribute so that it doesn't produce warnings with gcc 6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273308 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCFastISel.cpp b/lib/Target/PowerPC/PPCFastISel.cpp index 842d68bf1c9..7e92042d2f9 100644 --- a/lib/Target/PowerPC/PPCFastISel.cpp +++ b/lib/Target/PowerPC/PPCFastISel.cpp @@ -186,6 +186,7 @@ class PPCFastISel final : public FastISel { unsigned &NumBytes, bool IsVarArg); bool finishCall(MVT RetVT, CallLoweringInfo &CLI, unsigned &NumBytes); + LLVM_ATTRIBUTE_UNUSED CCAssignFn *usePPC32CCs(unsigned Flag); private: #include "PPCGenFastISel.inc" @@ -196,6 +197,19 @@ class PPCFastISel final : public FastISel { #include "PPCGenCallingConv.inc" +// Function whose sole purpose is to kill compiler warnings +// stemming from unused functions included from PPCGenCallingConv.inc. +CCAssignFn *PPCFastISel::usePPC32CCs(unsigned Flag) { + if (Flag == 1) + return CC_PPC32_SVR4; + else if (Flag == 2) + return CC_PPC32_SVR4_ByVal; + else if (Flag == 3) + return CC_PPC32_SVR4_VarArg; + else + return RetCC_PPC; +} + static Optional getComparePred(CmpInst::Predicate Pred) { switch (Pred) { // These are not representable with any single compare.