Run clang-format in small sections of code to make a patch easier to read.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 9 May 2014 15:49:02 +0000 (15:49 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 9 May 2014 15:49:02 +0000 (15:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208419 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Function.h
include/llvm/IR/GlobalValue.h
lib/IR/Function.cpp
lib/IR/Globals.cpp

index 2698d726436d770b0de6d7a57f50a60511aad261..1d10b6fd068d94f6d3c7cb6d85efdd981001bcef 100644 (file)
@@ -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;
index 77e750d73c00d956a8dda28cfe654cf574d328d5..60685cac27d75c4ed510b40f7204aa509b2c5bf8 100644 (file)
@@ -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);
   }
 
index c1a09686b0276fad110ad9a59d42d6259ce92058..da7774128a151a5f556bbef5d121cb94a5dd60e6 100644 (file)
@@ -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();
index 9303343a908b9fdab5ceefd8409e91bc01cc7d7f..0138a22381702b974f4fef9ff6f1976200ffb194 100644 (file)
@@ -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!");