[llvm-commits] [llvm] r49522 - in /llvm/branches/ggreif/use-diet: include/llvm/OperandTraits.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Reader/BitcodeReader.h
Gabor Greif
ggreif at gmail.com
Fri Apr 11 00:12:28 PDT 2008
Author: ggreif
Date: Fri Apr 11 02:12:28 2008
New Revision: 49522
URL: http://llvm.org/viewvc/llvm-project?rev=49522&view=rev
Log:
more detabification
Modified:
llvm/branches/ggreif/use-diet/include/llvm/OperandTraits.h
llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h
Modified: llvm/branches/ggreif/use-diet/include/llvm/OperandTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/include/llvm/OperandTraits.h?rev=49522&r1=49521&r2=49522&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/include/llvm/OperandTraits.h (original)
+++ llvm/branches/ggreif/use-diet/include/llvm/OperandTraits.h Fri Apr 11 02:12:28 2008
@@ -24,25 +24,25 @@
template <unsigned ARITY>
struct FixedNumOperandTraits {
static Use *op_begin(User* U) {
- return reinterpret_cast<Use*>(U) - ARITY;
- }
+ return reinterpret_cast<Use*>(U) - ARITY;
+ }
static Use *op_end(User* U) {
- return reinterpret_cast<Use*>(U);
- }
- static unsigned operands(const User*) {
- return ARITY;
- }
- struct prefix {
- Use Ops[ARITY];
- prefix(); // DO NOT IMPLEMENT
- };
+ return reinterpret_cast<Use*>(U);
+ }
+ static unsigned operands(const User*) {
+ return ARITY;
+ }
+ struct prefix {
+ Use Ops[ARITY];
+ prefix(); // DO NOT IMPLEMENT
+ };
template <class U>
- struct Layout {
- struct overlay : prefix, U {
- overlay(); // DO NOT IMPLEMENT
- };
- };
- static inline void *allocate(unsigned); // FIXME
+ struct Layout {
+ struct overlay : prefix, U {
+ overlay(); // DO NOT IMPLEMENT
+ };
+ };
+ static inline void *allocate(unsigned); // FIXME
};
//===----------------------------------------------------------------------===//
@@ -74,12 +74,12 @@
/// Macro for generating out-of-class operand accessor definitions
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS) \
VALUECLASS *CLASS::getOperand(unsigned i) const { \
- assert(i < OperandTraits<CLASS>::operands(this) && "getOperand() out of range!"); \
- return OperandTraits<CLASS>::op_begin(const_cast<CLASS*>(this))[i]; \
+ assert(i < OperandTraits<CLASS>::operands(this) && "getOperand() out of range!"); \
+ return OperandTraits<CLASS>::op_begin(const_cast<CLASS*>(this))[i]; \
} \
void CLASS::setOperand(unsigned i, VALUECLASS *Val) { \
- assert(i < OperandTraits<CLASS>::operands(this) && "setOperand() out of range!"); \
- OperandTraits<CLASS>::op_begin(this)[i] = Val; \
+ assert(i < OperandTraits<CLASS>::operands(this) && "setOperand() out of range!"); \
+ OperandTraits<CLASS>::op_begin(this)[i] = Val; \
} \
unsigned CLASS::getNumOperands() const { return OperandTraits<CLASS>::operands(this); } \
template <unsigned Idx> Use &CLASS::Op() { \
Modified: llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp?rev=49522&r1=49521&r2=49522&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.cpp Fri Apr 11 02:12:28 2008
@@ -138,7 +138,7 @@
}
- // FIXME: can we inherit this from ConstantExpr?
+ // FIXME: can we inherit this from ConstantExpr?
template <>
struct OperandTraits<ConstantPlaceHolder> : FixedNumOperandTraits<1> {
};
@@ -148,14 +148,14 @@
void BitcodeReaderValueList::resize(unsigned Desired) {
unsigned Capacity = 0;
- if (OperandList) {
- Capacity = OperandList->getImpliedUser() - OperandList;
- }
-
- if (Desired > Capacity)
- {
- // FIXME
- }
+ if (OperandList) {
+ Capacity = OperandList->getImpliedUser() - OperandList;
+ }
+
+ if (Desired > Capacity)
+ {
+ // FIXME
+ }
}
Constant *BitcodeReaderValueList::getConstantFwdRef(unsigned Idx,
Modified: llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h?rev=49522&r1=49521&r2=49522&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h (original)
+++ llvm/branches/ggreif/use-diet/lib/Bitcode/Reader/BitcodeReader.h Fri Apr 11 02:12:28 2008
@@ -53,11 +53,11 @@
BitcodeReaderValueList() : User(Type::VoidTy, Value::ArgumentVal, 0, 0) {}
/// Provide fast operand accessors
- DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
+ DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
// vector compatibility methods
unsigned size() const { return getNumOperands(); }
- void resize(unsigned);
+ void resize(unsigned);
void push_back(Value *V) {
// Uses.push_back(Use(V, this));
// OperandList = &Uses[0];
More information about the llvm-commits
mailing list