diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-09 15:49:02 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-09 15:49:02 +0000 |
commit | f35cc818103de762f6b6a8b009dca18150d2dccb (patch) | |
tree | 98699655127aaab0d071bfcc431056408a33491f | |
parent | 2439e5d2c2d5bedbe68916733d3d8c7a22d98f7a (diff) | |
download | llvm-f35cc818103de762f6b6a8b009dca18150d2dccb.tar.gz llvm-f35cc818103de762f6b6a8b009dca18150d2dccb.tar.bz2 llvm-f35cc818103de762f6b6a8b009dca18150d2dccb.tar.xz |
Run clang-format in small sections of code to make a patch easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208419 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/IR/Function.h | 3 | ||||
-rw-r--r-- | include/llvm/IR/GlobalValue.h | 6 | ||||
-rw-r--r-- | lib/IR/Function.cpp | 8 | ||||
-rw-r--r-- | lib/IR/Globals.cpp | 32 |
4 files changed, 22 insertions, 27 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index 2698d72643..1d10b6fd06 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -68,8 +68,7 @@ private: mutable ilist_half_node<Argument> Sentinel; }; -class Function : public GlobalValue, - public ilist_node<Function> { +class Function : public GlobalValue, public ilist_node<Function> { public: typedef iplist<Argument> ArgumentListType; typedef iplist<BasicBlock> BasicBlockListType; diff --git a/include/llvm/IR/GlobalValue.h b/include/llvm/IR/GlobalValue.h index 77e750d73c..60685cac27 100644 --- a/include/llvm/IR/GlobalValue.h +++ b/include/llvm/IR/GlobalValue.h @@ -61,9 +61,9 @@ public: protected: GlobalValue(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, LinkageTypes linkage, const Twine &Name) - : Constant(ty, vty, Ops, NumOps), Linkage(linkage), - Visibility(DefaultVisibility), Alignment(0), UnnamedAddr(0), - DllStorageClass(DefaultStorageClass), Parent(nullptr) { + : Constant(ty, vty, Ops, NumOps), Linkage(linkage), + Visibility(DefaultVisibility), Alignment(0), UnnamedAddr(0), + DllStorageClass(DefaultStorageClass), Parent(nullptr) { setName(Name); } diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp index c1a09686b0..da7774128a 100644 --- a/lib/IR/Function.cpp +++ b/lib/IR/Function.cpp @@ -207,10 +207,10 @@ void Function::eraseFromParent() { // Function Implementation //===----------------------------------------------------------------------===// -Function::Function(FunctionType *Ty, LinkageTypes Linkage, - const Twine &name, Module *ParentModule) - : GlobalValue(PointerType::getUnqual(Ty), - Value::FunctionVal, nullptr, 0, Linkage, name) { +Function::Function(FunctionType *Ty, LinkageTypes Linkage, const Twine &name, + Module *ParentModule) + : GlobalValue(PointerType::getUnqual(Ty), Value::FunctionVal, nullptr, 0, + Linkage, name) { assert(FunctionType::isValidReturnType(getReturnType()) && "invalid return type"); SymTab = new ValueSymbolTable(); diff --git a/lib/IR/Globals.cpp b/lib/IR/Globals.cpp index 9303343a90..0138a22381 100644 --- a/lib/IR/Globals.cpp +++ b/lib/IR/Globals.cpp @@ -110,16 +110,14 @@ bool GlobalValue::isDeclaration() const { //===----------------------------------------------------------------------===// GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link, - Constant *InitVal, - const Twine &Name, ThreadLocalMode TLMode, - unsigned AddressSpace, + Constant *InitVal, const Twine &Name, + ThreadLocalMode TLMode, unsigned AddressSpace, bool isExternallyInitialized) - : GlobalValue(PointerType::get(Ty, AddressSpace), - Value::GlobalVariableVal, - OperandTraits<GlobalVariable>::op_begin(this), - InitVal != nullptr, Link, Name), - isConstantGlobal(constant), threadLocalMode(TLMode), - isExternallyInitializedConstant(isExternallyInitialized) { + : GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalVariableVal, + OperandTraits<GlobalVariable>::op_begin(this), + InitVal != nullptr, Link, Name), + isConstantGlobal(constant), threadLocalMode(TLMode), + isExternallyInitializedConstant(isExternallyInitialized) { if (InitVal) { assert(InitVal->getType() == Ty && "Initializer should be the same type as the GlobalVariable!"); @@ -131,16 +129,14 @@ GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link, GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant, LinkageTypes Link, Constant *InitVal, - const Twine &Name, - GlobalVariable *Before, ThreadLocalMode TLMode, - unsigned AddressSpace, + const Twine &Name, GlobalVariable *Before, + ThreadLocalMode TLMode, unsigned AddressSpace, bool isExternallyInitialized) - : GlobalValue(PointerType::get(Ty, AddressSpace), - Value::GlobalVariableVal, - OperandTraits<GlobalVariable>::op_begin(this), - InitVal != nullptr, Link, Name), - isConstantGlobal(constant), threadLocalMode(TLMode), - isExternallyInitializedConstant(isExternallyInitialized) { + : GlobalValue(PointerType::get(Ty, AddressSpace), Value::GlobalVariableVal, + OperandTraits<GlobalVariable>::op_begin(this), + InitVal != nullptr, Link, Name), + isConstantGlobal(constant), threadLocalMode(TLMode), + isExternallyInitializedConstant(isExternallyInitialized) { if (InitVal) { assert(InitVal->getType() == Ty && "Initializer should be the same type as the GlobalVariable!"); |