summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2015-09-22 11:13:55 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2015-09-22 11:13:55 +0000
commit70ad98aca403cd1cb75fb326517e528b589808a4 (patch)
tree1c34b9ab728cbfa597c6f80cb59cb12b128e7652 /llvm/include
parent59a16a76beb8f46525eaab65fff915a9941d75ea (diff)
downloadbcm5719-llvm-70ad98aca403cd1cb75fb326517e528b589808a4.tar.gz
bcm5719-llvm-70ad98aca403cd1cb75fb326517e528b589808a4.zip
Reformat.
llvm-svn: 248261
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/IR/Constant.h4
-rw-r--r--llvm/include/llvm/IR/DerivedTypes.h23
-rw-r--r--llvm/include/llvm/IR/Function.h12
-rw-r--r--llvm/include/llvm/IR/IRBuilder.h6
-rw-r--r--llvm/include/llvm/IR/InstrTypes.h44
-rw-r--r--llvm/include/llvm/IR/Instructions.h27
-rw-r--r--llvm/include/llvm/IR/Module.h12
-rw-r--r--llvm/include/llvm/IR/SymbolTableListTraits.h8
-rw-r--r--llvm/include/llvm/IR/Type.h3
9 files changed, 66 insertions, 73 deletions
diff --git a/llvm/include/llvm/IR/Constant.h b/llvm/include/llvm/IR/Constant.h
index 019b4343a13..f33abbf62da 100644
--- a/llvm/include/llvm/IR/Constant.h
+++ b/llvm/include/llvm/IR/Constant.h
@@ -159,8 +159,8 @@ public:
/// getIntegerValue - Return the value for an integer or pointer constant,
/// or a vector thereof, with the given scalar value.
- static Constant *getIntegerValue(Type* Ty, const APInt &V);
-
+ static Constant *getIntegerValue(Type *Ty, const APInt &V);
+
/// removeDeadConstantUsers - If there are any dead constant users dangling
/// off of this constant, remove them. This method is useful for clients
/// that want to check to see if a global is unused, but don't want to deal
diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h
index d28847e4ff3..694354ee3b2 100644
--- a/llvm/include/llvm/IR/DerivedTypes.h
+++ b/llvm/include/llvm/IR/DerivedTypes.h
@@ -147,9 +147,9 @@ static_assert(AlignOf<FunctionType>::Alignment >= AlignOf<Type *>::Alignment,
/// and VectorType.
class CompositeType : public Type {
protected:
- explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) { }
-public:
+ explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) {}
+public:
/// getTypeAtIndex - Given an index value into the type, return the type of
/// the element.
///
@@ -212,16 +212,13 @@ public:
/// StructType::create - This creates an identified struct.
static StructType *create(LLVMContext &Context, StringRef Name);
static StructType *create(LLVMContext &Context);
-
- static StructType *create(ArrayRef<Type*> Elements,
- StringRef Name,
- bool isPacked = false);
- static StructType *create(ArrayRef<Type*> Elements);
- static StructType *create(LLVMContext &Context,
- ArrayRef<Type*> Elements,
- StringRef Name,
+
+ static StructType *create(ArrayRef<Type *> Elements, StringRef Name,
bool isPacked = false);
- static StructType *create(LLVMContext &Context, ArrayRef<Type*> Elements);
+ static StructType *create(ArrayRef<Type *> Elements);
+ static StructType *create(LLVMContext &Context, ArrayRef<Type *> Elements,
+ StringRef Name, bool isPacked = false);
+ static StructType *create(LLVMContext &Context, ArrayRef<Type *> Elements);
static StructType *create(StringRef Name, Type *elt1, ...) LLVM_END_WITH_NULL;
/// StructType::get - This static method is the primary way to create a
@@ -250,8 +247,8 @@ public:
bool isOpaque() const { return (getSubclassData() & SCDB_HasBody) == 0; }
/// isSized - Return true if this is a sized type.
- bool isSized(SmallPtrSetImpl<Type*> *Visited = nullptr) const;
-
+ bool isSized(SmallPtrSetImpl<Type *> *Visited = nullptr) const;
+
/// hasName - Return true if this is a named struct that has a non-empty name.
bool hasName() const { return SymbolTableEntry != nullptr; }
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h
index 0c507e4b972..ba334d65313 100644
--- a/llvm/include/llvm/IR/Function.h
+++ b/llvm/include/llvm/IR/Function.h
@@ -300,10 +300,8 @@ public:
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
Attribute::ArgMemOnly);
}
- void setOnlyAccessesArgMemory() {
- addFnAttr(Attribute::ArgMemOnly);
- }
-
+ void setOnlyAccessesArgMemory() { addFnAttr(Attribute::ArgMemOnly); }
+
/// @brief Determine if the function cannot return.
bool doesNotReturn() const {
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
@@ -397,10 +395,8 @@ public:
}
/// Optimize this function for minimum size (-Oz).
- bool optForMinSize() const {
- return hasFnAttribute(Attribute::MinSize);
- };
-
+ bool optForMinSize() const { return hasFnAttribute(Attribute::MinSize); };
+
/// Optimize this function for size (-Os) or minimum size (-Oz).
bool optForSize() const {
return hasFnAttribute(Attribute::OptimizeForSize) || optForMinSize();
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index d46514614e4..5343d9fe358 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -314,10 +314,8 @@ public:
}
/// \brief Fetch the type representing a 128-bit integer.
- IntegerType *getInt128Ty() {
- return Type::getInt128Ty(Context);
- }
-
+ IntegerType *getInt128Ty() { return Type::getInt128Ty(Context); }
+
/// \brief Fetch the type representing an N-bit integer.
IntegerType *getIntNTy(unsigned N) {
return Type::getIntNTy(Context, N);
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index d84e66c50a3..bd45144c169 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -441,29 +441,29 @@ public:
BO->setIsExact(true);
return BO;
}
-
-#define DEFINE_HELPERS(OPC, NUWNSWEXACT) \
- static BinaryOperator *Create ## NUWNSWEXACT ## OPC \
- (Value *V1, Value *V2, const Twine &Name = "") { \
- return Create ## NUWNSWEXACT(Instruction::OPC, V1, V2, Name); \
- } \
- static BinaryOperator *Create ## NUWNSWEXACT ## OPC \
- (Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { \
- return Create ## NUWNSWEXACT(Instruction::OPC, V1, V2, Name, BB); \
- } \
- static BinaryOperator *Create ## NUWNSWEXACT ## OPC \
- (Value *V1, Value *V2, const Twine &Name, Instruction *I) { \
- return Create ## NUWNSWEXACT(Instruction::OPC, V1, V2, Name, I); \
+
+#define DEFINE_HELPERS(OPC, NUWNSWEXACT) \
+ static BinaryOperator *Create##NUWNSWEXACT##OPC(Value *V1, Value *V2, \
+ const Twine &Name = "") { \
+ return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name); \
+ } \
+ static BinaryOperator *Create##NUWNSWEXACT##OPC( \
+ Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { \
+ return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name, BB); \
+ } \
+ static BinaryOperator *Create##NUWNSWEXACT##OPC( \
+ Value *V1, Value *V2, const Twine &Name, Instruction *I) { \
+ return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name, I); \
}
-
- DEFINE_HELPERS(Add, NSW) // CreateNSWAdd
- DEFINE_HELPERS(Add, NUW) // CreateNUWAdd
- DEFINE_HELPERS(Sub, NSW) // CreateNSWSub
- DEFINE_HELPERS(Sub, NUW) // CreateNUWSub
- DEFINE_HELPERS(Mul, NSW) // CreateNSWMul
- DEFINE_HELPERS(Mul, NUW) // CreateNUWMul
- DEFINE_HELPERS(Shl, NSW) // CreateNSWShl
- DEFINE_HELPERS(Shl, NUW) // CreateNUWShl
+
+ DEFINE_HELPERS(Add, NSW) // CreateNSWAdd
+ DEFINE_HELPERS(Add, NUW) // CreateNUWAdd
+ DEFINE_HELPERS(Sub, NSW) // CreateNSWSub
+ DEFINE_HELPERS(Sub, NUW) // CreateNUWSub
+ DEFINE_HELPERS(Mul, NSW) // CreateNSWMul
+ DEFINE_HELPERS(Mul, NUW) // CreateNUWMul
+ DEFINE_HELPERS(Shl, NSW) // CreateNSWShl
+ DEFINE_HELPERS(Shl, NUW) // CreateNUWShl
DEFINE_HELPERS(SDiv, Exact) // CreateExactSDiv
DEFINE_HELPERS(UDiv, Exact) // CreateExactUDiv
diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
index 1497231cbe0..825f4cace88 100644
--- a/llvm/include/llvm/IR/Instructions.h
+++ b/llvm/include/llvm/IR/Instructions.h
@@ -1689,10 +1689,9 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
-private:
- template<typename AttrKind>
- bool hasFnAttrImpl(AttrKind A) const {
+private:
+ template <typename AttrKind> bool hasFnAttrImpl(AttrKind A) const {
if (AttributeList.hasAttribute(AttributeSet::FunctionIndex, A))
return true;
if (const Function *F = getCalledFunction())
@@ -1924,8 +1923,9 @@ class InsertElementInst : public Instruction {
InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
const Twine &NameStr = "",
Instruction *InsertBefore = nullptr);
- InsertElementInst(Value *Vec, Value *NewElt, Value *Idx,
- const Twine &NameStr, BasicBlock *InsertAtEnd);
+ InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr,
+ BasicBlock *InsertAtEnd);
+
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@@ -2081,9 +2081,8 @@ class ExtractValueInst : public UnaryInstruction {
const Twine &NameStr, BasicBlock *InsertAtEnd);
// allocate space for exactly one operand
- void *operator new(size_t s) {
- return User::operator new(s, 1);
- }
+ void *operator new(size_t s) { return User::operator new(s, 1); }
+
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@@ -2195,11 +2194,12 @@ class InsertValueInst : public Instruction {
/// Constructors - These two constructors are convenience methods because one
/// and two index insertvalue instructions are so common.
- InsertValueInst(Value *Agg, Value *Val,
- unsigned Idx, const Twine &NameStr = "",
- Instruction *InsertBefore = nullptr);
InsertValueInst(Value *Agg, Value *Val, unsigned Idx,
- const Twine &NameStr, BasicBlock *InsertAtEnd);
+ const Twine &NameStr = "",
+ Instruction *InsertBefore = nullptr);
+ InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr,
+ BasicBlock *InsertAtEnd);
+
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@@ -2930,8 +2930,7 @@ public:
typedef CaseIteratorT<SwitchInst, ConstantInt, BasicBlock> ParentTy;
public:
-
- CaseIt(const ParentTy& Src) : ParentTy(Src) {}
+ CaseIt(const ParentTy &Src) : ParentTy(Src) {}
CaseIt(SwitchInst *SI, unsigned CaseNum) : ParentTy(SI, CaseNum) {}
/// Sets the new value for current case.
diff --git a/llvm/include/llvm/IR/Module.h b/llvm/include/llvm/IR/Module.h
index 4d9c266fdb7..b0bedf6ad1f 100644
--- a/llvm/include/llvm/IR/Module.h
+++ b/llvm/include/llvm/IR/Module.h
@@ -61,8 +61,11 @@ template<> struct ilist_traits<GlobalVariable>
static void destroySentinel(GlobalVariable*) {}
GlobalVariable *provideInitialHead() const { return createSentinel(); }
- GlobalVariable *ensureHead(GlobalVariable*) const { return createSentinel(); }
- static void noteHead(GlobalVariable*, GlobalVariable*) {}
+ GlobalVariable *ensureHead(GlobalVariable *) const {
+ return createSentinel();
+ }
+ static void noteHead(GlobalVariable *, GlobalVariable *) {}
+
private:
mutable ilist_node<GlobalVariable> Sentinel;
};
@@ -76,8 +79,9 @@ template<> struct ilist_traits<GlobalAlias>
static void destroySentinel(GlobalAlias*) {}
GlobalAlias *provideInitialHead() const { return createSentinel(); }
- GlobalAlias *ensureHead(GlobalAlias*) const { return createSentinel(); }
- static void noteHead(GlobalAlias*, GlobalAlias*) {}
+ GlobalAlias *ensureHead(GlobalAlias *) const { return createSentinel(); }
+ static void noteHead(GlobalAlias *, GlobalAlias *) {}
+
private:
mutable ilist_node<GlobalAlias> Sentinel;
};
diff --git a/llvm/include/llvm/IR/SymbolTableListTraits.h b/llvm/include/llvm/IR/SymbolTableListTraits.h
index 0a5149c3d93..9a7f28d0d46 100644
--- a/llvm/include/llvm/IR/SymbolTableListTraits.h
+++ b/llvm/include/llvm/IR/SymbolTableListTraits.h
@@ -29,10 +29,10 @@
namespace llvm {
class ValueSymbolTable;
-
-template<typename NodeTy> class ilist_iterator;
-template<typename NodeTy, typename Traits> class iplist;
-template<typename Ty> struct ilist_traits;
+
+template <typename NodeTy> class ilist_iterator;
+template <typename NodeTy, typename Traits> class iplist;
+template <typename Ty> struct ilist_traits;
// ValueSubClass - The type of objects that I hold, e.g. Instruction.
// ItemParentClass - The type of object that owns the list, e.g. BasicBlock.
diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h
index adfa5f25a22..8979f1dbd14 100644
--- a/llvm/include/llvm/IR/Type.h
+++ b/llvm/include/llvm/IR/Type.h
@@ -438,8 +438,7 @@ template <> struct isa_impl<PointerType, Type> {
// Provide specializations of GraphTraits to be able to treat a type as a
// graph of sub types.
-
-template <> struct GraphTraits<Type*> {
+template <> struct GraphTraits<Type *> {
typedef Type NodeType;
typedef Type::subtype_iterator ChildIteratorType;
OpenPOWER on IntegriCloud