[llvm-commits] [llvm] r111082 - in /llvm/trunk: lib/Analysis/InstCount.cpp lib/Bitcode/Reader/BitcodeReader.cpp lib/Linker/LinkModules.cpp lib/Target/X86/X86MCCodeEmitter.cpp lib/VMCore/Verifier.cpp utils/unittest/googletest/include/gtest/internal/gtest-port.h
Argyrios Kyrtzidis
akyrtzi at gmail.com
Sat Aug 14 14:35:10 PDT 2010
Author: akirtzidis
Date: Sat Aug 14 16:35:10 2010
New Revision: 111082
URL: http://llvm.org/viewvc/llvm-project?rev=111082&view=rev
Log:
Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.
Modified:
llvm/trunk/lib/Analysis/InstCount.cpp
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp
llvm/trunk/lib/VMCore/Verifier.cpp
llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
Modified: llvm/trunk/lib/Analysis/InstCount.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstCount.cpp?rev=111082&r1=111081&r2=111082&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstCount.cpp (original)
+++ llvm/trunk/lib/Analysis/InstCount.cpp Sat Aug 14 16:35:10 2010
@@ -45,7 +45,7 @@
#include "llvm/Instruction.def"
- void visitInstruction(Instruction &I) {
+ void visitInstruction(Instruction &I) ATTRIBUTE_UNUSED {
errs() << "Instruction Count does not know about " << I;
llvm_unreachable(0);
}
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=111082&r1=111081&r2=111082&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Sat Aug 14 16:35:10 2010
@@ -135,8 +135,8 @@
/// @brief A class for maintaining the slot number definition
/// as a placeholder for the actual definition for forward constants defs.
class ConstantPlaceHolder : public ConstantExpr {
- ConstantPlaceHolder(); // DO NOT IMPLEMENT
- void operator=(const ConstantPlaceHolder &); // DO NOT IMPLEMENT
+ ConstantPlaceHolder() ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
+ void operator=(const ConstantPlaceHolder &) ATTRIBUTE_UNUSED;//NOT IMPLEMENT
public:
// allocate space for exactly one operand
void *operator new(size_t s) {
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=111082&r1=111081&r2=111082&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Sat Aug 14 16:35:10 2010
@@ -78,8 +78,8 @@
typedef DenseMap<const Type*, PATypeHolder> TheMapTy;
TheMapTy TheMap;
- LinkerTypeMap(const LinkerTypeMap&); // DO NOT IMPLEMENT
- void operator=(const LinkerTypeMap&); // DO NOT IMPLEMENT
+ LinkerTypeMap(const LinkerTypeMap&) ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
+ void operator=(const LinkerTypeMap&) ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
public:
LinkerTypeMap() {}
~LinkerTypeMap() {
Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=111082&r1=111081&r2=111082&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Sat Aug 14 16:35:10 2010
@@ -19,12 +19,13 @@
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/Compiler.h"
using namespace llvm;
namespace {
class X86MCCodeEmitter : public MCCodeEmitter {
- X86MCCodeEmitter(const X86MCCodeEmitter &); // DO NOT IMPLEMENT
- void operator=(const X86MCCodeEmitter &); // DO NOT IMPLEMENT
+ X86MCCodeEmitter(const X86MCCodeEmitter &) ATTRIBUTE_UNUSED; // DONT IMPLEMENT
+ void operator=(const X86MCCodeEmitter &) ATTRIBUTE_UNUSED; // DO NOT IMPLEMENT
const TargetMachine &TM;
const TargetInstrInfo &TII;
MCContext &Ctx;
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=111082&r1=111081&r2=111082&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Sat Aug 14 16:35:10 2010
@@ -151,8 +151,8 @@
SmallSetVector<const Type *, 16> Types;
// Disallow copying.
- TypeSet(const TypeSet &);
- TypeSet &operator=(const TypeSet &);
+ TypeSet(const TypeSet &) ATTRIBUTE_UNUSED;
+ TypeSet &operator=(const TypeSet &) ATTRIBUTE_UNUSED;
};
struct Verifier : public FunctionPass, public InstVisitor<Verifier> {
Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=111082&r1=111081&r2=111082&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h Sat Aug 14 16:35:10 2010
@@ -556,12 +556,12 @@
// A macro to disallow operator=
// This should be used in the private: declarations for a class.
#define GTEST_DISALLOW_ASSIGN_(type)\
- void operator=(type const &)
+ void operator=(type const &) GTEST_ATTRIBUTE_UNUSED_
// A macro to disallow copy constructor and operator=
// This should be used in the private: declarations for a class.
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)\
- type(type const &);\
+ type(type const &) GTEST_ATTRIBUTE_UNUSED_;\
GTEST_DISALLOW_ASSIGN_(type)
// Tell the compiler to warn about unused return values for functions declared
More information about the llvm-commits
mailing list