llvm.org GIT mirror llvm / 7268d97
Add ATTRIBUTE_UNUSED to methods that are not supposed to be used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111082 91177308-0d34-0410-b5e6-96231b3b80d8 Argyrios Kyrtzidis 9 years ago
6 changed file(s) with 12 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
4444
4545 #include "llvm/Instruction.def"
4646
47 void visitInstruction(Instruction &I) {
47 void visitInstruction(Instruction &I) ATTRIBUTE_UNUSED {
4848 errs() << "Instruction Count does not know about " << I;
4949 llvm_unreachable(0);
5050 }
134134 /// @brief A class for maintaining the slot number definition
135135 /// as a placeholder for the actual definition for forward constants defs.
136136 class ConstantPlaceHolder : public ConstantExpr {
137 ConstantPlaceHolder(); // DO NOT IMPLEMENT
138 void operator=(const ConstantPlaceHolder &); // DO NOT IMPLEMENT
137 ConstantPlaceHolder() ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
138 void operator=(const ConstantPlaceHolder &) ATTRIBUTE_UNUSED;//NOT IMPLEMENT
139139 public:
140140 // allocate space for exactly one operand
141141 void *operator new(size_t s) {
7777 typedef DenseMap TheMapTy;
7878 TheMapTy TheMap;
7979
80 LinkerTypeMap(const LinkerTypeMap&); // DO NOT IMPLEMENT
81 void operator=(const LinkerTypeMap&); // DO NOT IMPLEMENT
80 LinkerTypeMap(const LinkerTypeMap&) ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
81 void operator=(const LinkerTypeMap&) ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
8282 public:
8383 LinkerTypeMap() {}
8484 ~LinkerTypeMap() {
1818 #include "llvm/MC/MCExpr.h"
1919 #include "llvm/MC/MCInst.h"
2020 #include "llvm/Support/raw_ostream.h"
21 #include "llvm/Support/Compiler.h"
2122 using namespace llvm;
2223
2324 namespace {
2425 class X86MCCodeEmitter : public MCCodeEmitter {
25 X86MCCodeEmitter(const X86MCCodeEmitter &); // DO NOT IMPLEMENT
26 void operator=(const X86MCCodeEmitter &); // DO NOT IMPLEMENT
26 X86MCCodeEmitter(const X86MCCodeEmitter &) ATTRIBUTE_UNUSED; // DONT IMPLEMENT
27 void operator=(const X86MCCodeEmitter &) ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
2728 const TargetMachine &TM;
2829 const TargetInstrInfo &TII;
2930 MCContext &Ctx;
150150 SmallSetVector Types;
151151
152152 // Disallow copying.
153 TypeSet(const TypeSet &);
154 TypeSet &operator=(const TypeSet &);
153 TypeSet(const TypeSet &) ATTRIBUTE_UNUSED;
154 TypeSet &operator=(const TypeSet &) ATTRIBUTE_UNUSED;
155155 };
156156
157157 struct Verifier : public FunctionPass, public InstVisitor {
555555 // A macro to disallow operator=
556556 // This should be used in the private: declarations for a class.
557557 #define GTEST_DISALLOW_ASSIGN_(type)\
558 void operator=(type const &)
558 void operator=(type const &) GTEST_ATTRIBUTE_UNUSED_
559559
560560 // A macro to disallow copy constructor and operator=
561561 // This should be used in the private: declarations for a class.
562562 #define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
563 type(type const &);\
563 type(type const &) GTEST_ATTRIBUTE_UNUSED_;\
564564 GTEST_DISALLOW_ASSIGN_(type)
565565
566566 // Tell the compiler to warn about unused return values for functions declared