Avoid warnings about unused parameters that tend to come up a lot when
authorDuncan Sands <baldrick@free.fr>
Mon, 10 Jun 2013 12:09:30 +0000 (12:09 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 10 Jun 2013 12:09:30 +0000 (12:09 +0000)
building outside projects with a different compiler than that used to build
LLVM itself (eg switching between gcc and clang).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183650 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/FoldingSet.h
include/llvm/Support/GetElementPtrTypeIterator.h
include/llvm/Support/MathExtras.h
include/llvm/Support/TargetRegistry.h
include/llvm/Target/TargetLowering.h
include/llvm/Target/TargetMachine.h

index 91794dea69819c4469a4ab863557400fbda7e62b..1b2c94c35f84ea874093d6a70cce078ba472f383 100644 (file)
@@ -352,7 +352,8 @@ template<class T> class FoldingSetBucketIterator;
 template<typename T>
 inline bool
 DefaultFoldingSetTrait<T>::Equals(T &X, const FoldingSetNodeID &ID,
-                                  unsigned IDHash, FoldingSetNodeID &TempID) {
+                                  unsigned /*IDHash*/,
+                                  FoldingSetNodeID &TempID) {
   FoldingSetTrait<T>::Profile(X, TempID);
   return TempID == ID;
 }
@@ -366,7 +367,7 @@ template<typename T, typename Ctx>
 inline bool
 DefaultContextualFoldingSetTrait<T, Ctx>::Equals(T &X,
                                                  const FoldingSetNodeID &ID,
-                                                 unsigned IDHash,
+                                                 unsigned /*IDHash*/,
                                                  FoldingSetNodeID &TempID,
                                                  Ctx Context) {
   ContextualFoldingSetTrait<T, Ctx>::Profile(X, TempID, Context);
index 5a90553a0074e5705dd2a49db2e6a63ec6b5ca85..aacb53162cf7fd250ffaca761c0ac8d207592da1 100644 (file)
@@ -105,7 +105,7 @@ namespace llvm {
 
   template<typename T>
   inline generic_gep_type_iterator<const T *>
-  gep_type_end(Type *Op0, ArrayRef<T> A) {
+  gep_type_end(Type * /*Op0*/, ArrayRef<T> A) {
     return generic_gep_type_iterator<const T *>::end(A.end());
   }
 } // end namespace llvm
index be76f3215577c29733b7da42c32ddef23fc48b09..a65bfbcd203a8cea12df253296a88974131ac4e8 100644 (file)
@@ -45,7 +45,7 @@ enum ZeroBehavior {
 template <typename T>
 typename enable_if_c<std::numeric_limits<T>::is_integer &&
                      !std::numeric_limits<T>::is_signed, std::size_t>::type
-countTrailingZeros(T Val, ZeroBehavior ZB = ZB_Width) {
+countTrailingZeros(T Val, ZeroBehavior /*ZB*/ = ZB_Width) {
   if (!Val)
     return std::numeric_limits<T>::digits;
   if (Val & 0x1)
@@ -114,7 +114,7 @@ inline std::size_t countTrailingZeros<uint64_t>(uint64_t Val, ZeroBehavior ZB) {
 template <typename T>
 typename enable_if_c<std::numeric_limits<T>::is_integer &&
                      !std::numeric_limits<T>::is_signed, std::size_t>::type
-countLeadingZeros(T Val, ZeroBehavior ZB = ZB_Width) {
+countLeadingZeros(T Val, ZeroBehavior /*ZB*/ = ZB_Width) {
   if (!Val)
     return std::numeric_limits<T>::digits;
 
index c9d43738fac8324765d88d8033acce5d36d92e28..109b3a2fa3bf83d4e3be34362c8fac5dbdbedccf 100644 (file)
@@ -891,7 +891,7 @@ namespace llvm {
       TargetRegistry::RegisterMCAsmInfo(T, &Allocator);
     }
   private:
-    static MCAsmInfo *Allocator(const MCRegisterInfo &MRI, StringRef TT) {
+    static MCAsmInfo *Allocator(const MCRegisterInfo &/*MRI*/, StringRef TT) {
       return new MCAsmInfoImpl(TT);
     }
 
@@ -925,8 +925,9 @@ namespace llvm {
       TargetRegistry::RegisterMCCodeGenInfo(T, &Allocator);
     }
   private:
-    static MCCodeGenInfo *Allocator(StringRef TT, Reloc::Model RM,
-                                    CodeModel::Model CM, CodeGenOpt::Level OL) {
+    static MCCodeGenInfo *Allocator(StringRef /*TT*/, Reloc::Model /*RM*/,
+                                    CodeModel::Model /*CM*/,
+                                    CodeGenOpt::Level /*OL*/) {
       return new MCCodeGenInfoImpl();
     }
   };
@@ -1025,7 +1026,7 @@ namespace llvm {
       TargetRegistry::RegisterMCRegInfo(T, &Allocator);
     }
   private:
-    static MCRegisterInfo *Allocator(StringRef TT) {
+    static MCRegisterInfo *Allocator(StringRef /*TT*/) {
       return new MCRegisterInfoImpl();
     }
   };
@@ -1058,8 +1059,8 @@ namespace llvm {
       TargetRegistry::RegisterMCSubtargetInfo(T, &Allocator);
     }
   private:
-    static MCSubtargetInfo *Allocator(StringRef TT, StringRef CPU,
-                                      StringRef FS) {
+    static MCSubtargetInfo *Allocator(StringRef /*TT*/, StringRef /*CPU*/,
+                                      StringRef /*FS*/) {
       return new MCSubtargetInfoImpl();
     }
   };
@@ -1178,10 +1179,10 @@ namespace llvm {
     }
 
   private:
-    static MCCodeEmitter *Allocator(const MCInstrInfo &II,
-                                    const MCRegisterInfo &MRI,
-                                    const MCSubtargetInfo &STI,
-                                    MCContext &Ctx) {
+    static MCCodeEmitter *Allocator(const MCInstrInfo &/*II*/,
+                                    const MCRegisterInfo &/*MRI*/,
+                                    const MCSubtargetInfo &/*STI*/,
+                                    MCContext &/*Ctx*/) {
       return new MCCodeEmitterImpl();
     }
   };
index d67e55dc6655a0d7c7b3916f02b2d56e931e8826..9483282e0b78638427ab607f1ddf393432e0cc7f 100644 (file)
@@ -148,7 +148,7 @@ public:
   // Return the pointer type for the given address space, defaults to
   // the pointer type from the data layout.
   // FIXME: The default needs to be removed once all the code is updated.
-  virtual MVT getPointerTy(uint32_t AS = 0) const { return PointerTy; }
+  virtual MVT getPointerTy(uint32_t /*AS*/ = 0) const { return PointerTy; }
   virtual MVT getScalarShiftAmountTy(EVT LHSTy) const;
 
   EVT getShiftAmountTy(EVT LHSTy) const;
@@ -157,12 +157,14 @@ public:
   /// this target.
   bool isSelectExpensive() const { return SelectIsExpensive; }
 
-  virtual bool isSelectSupported(SelectSupportKind kind) const { return true; }
+  virtual bool isSelectSupported(SelectSupportKind /*kind*/) const {
+    return true;
+  }
 
   /// shouldSplitVectorElementType - Return true if a vector of the given type
   /// should be split (TypeSplitVector) instead of promoted
   /// (TypePromoteInteger) during type legalization.
-  virtual bool shouldSplitVectorElementType(EVT VT) const { return false; }
+  virtual bool shouldSplitVectorElementType(EVT /*VT*/) const { return false; }
 
   /// isIntDivCheap() - Return true if integer divide is usually cheaper than
   /// a sequence of several shifts, adds, and multiplies for this target.
@@ -694,7 +696,7 @@ public:
   /// replacements don't generate code that causes an alignment error  (trap) on
   /// the target machine.
   /// @brief Determine if the target supports unaligned memory accesses.
-  virtual bool allowsUnalignedMemoryAccesses(EVT, bool *Fast = 0) const {
+  virtual bool allowsUnalignedMemoryAccesses(EVT, bool * /*Fast*/ = 0) const {
     return false;
   }
 
@@ -724,9 +726,7 @@ public:
   /// targets without SSE2 f64 load / store are done with fldl / fstpl which
   /// also does type conversion. Note the specified type doesn't have to be
   /// legal as the hook is used before type legalization.
-  virtual bool isSafeMemOpType(MVT VT) const {
-    return true;
-  }
+  virtual bool isSafeMemOpType(MVT /*VT*/) const { return true; }
 
   /// usesUnderscoreSetJmp - Determine if we should use _setjmp or setjmp
   /// to implement llvm.setjmp.
@@ -1110,9 +1110,9 @@ public:
   /// much computation as possible to be done in the address mode for that
   /// operand.  This hook lets targets also pass back when this should be done
   /// on intrinsics which load/store.
-  virtual bool GetAddrModeArguments(IntrinsicInst *I,
-                                    SmallVectorImpl<Value*> &Ops,
-                                    Type *&AccessTy) const {
+  virtual bool GetAddrModeArguments(IntrinsicInst * /*I*/,
+                                    SmallVectorImpl<Value*> &/*Ops*/,
+                                    Type *&/*AccessTy*/) const {
     return false;
   }
 
@@ -2031,7 +2031,7 @@ public:
   /// tail call.
   /// This is used to determine whether it is possible
   /// to codegen a libcall as tail call at legalization time.
-  virtual bool isUsedByReturnOnly(SDNode *, SDValue &Chain) const {
+  virtual bool isUsedByReturnOnly(SDNode *, SDValue &/*Chain*/) const {
     return false;
   }
 
index c5e4b278d9ff49b53443c82227b0e0fd2b9bfd31..7f04119ae664196735dab55283e4145ba1a5423d 100644 (file)
@@ -252,8 +252,8 @@ public:
                                    formatted_raw_ostream &,
                                    CodeGenFileType,
                                    bool /*DisableVerify*/ = true,
-                                   AnalysisID StartAfter = 0,
-                                   AnalysisID StopAfter = 0) {
+                                   AnalysisID /*StartAfter*/ = 0,
+                                   AnalysisID /*StopAfter*/ = 0) {
     return true;
   }