From 42ae74531c42967828ddb80476baf457c6b95a4d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 9 May 2014 00:57:59 +0000 Subject: [PATCH] Don't indent in namespaces. llvm-svn: 208384 --- clang/lib/CodeGen/CodeGenFunction.h | 80 +++++------ clang/lib/CodeGen/CodeGenModule.h | 211 ++++++++++++++-------------- 2 files changed, 144 insertions(+), 147 deletions(-) diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 73f6b68e8d73..6af7a98d96e0 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -35,51 +35,51 @@ #include "llvm/Support/Debug.h" namespace llvm { - class BasicBlock; - class LLVMContext; - class MDNode; - class Module; - class SwitchInst; - class Twine; - class Value; - class CallSite; +class BasicBlock; +class LLVMContext; +class MDNode; +class Module; +class SwitchInst; +class Twine; +class Value; +class CallSite; } namespace clang { - class ASTContext; - class BlockDecl; - class CXXDestructorDecl; - class CXXForRangeStmt; - class CXXTryStmt; - class Decl; - class LabelDecl; - class EnumConstantDecl; - class FunctionDecl; - class FunctionProtoType; - class LabelStmt; - class ObjCContainerDecl; - class ObjCInterfaceDecl; - class ObjCIvarDecl; - class ObjCMethodDecl; - class ObjCImplementationDecl; - class ObjCPropertyImplDecl; - class TargetInfo; - class TargetCodeGenInfo; - class VarDecl; - class ObjCForCollectionStmt; - class ObjCAtTryStmt; - class ObjCAtThrowStmt; - class ObjCAtSynchronizedStmt; - class ObjCAutoreleasePoolStmt; +class ASTContext; +class BlockDecl; +class CXXDestructorDecl; +class CXXForRangeStmt; +class CXXTryStmt; +class Decl; +class LabelDecl; +class EnumConstantDecl; +class FunctionDecl; +class FunctionProtoType; +class LabelStmt; +class ObjCContainerDecl; +class ObjCInterfaceDecl; +class ObjCIvarDecl; +class ObjCMethodDecl; +class ObjCImplementationDecl; +class ObjCPropertyImplDecl; +class TargetInfo; +class TargetCodeGenInfo; +class VarDecl; +class ObjCForCollectionStmt; +class ObjCAtTryStmt; +class ObjCAtThrowStmt; +class ObjCAtSynchronizedStmt; +class ObjCAutoreleasePoolStmt; namespace CodeGen { - class CodeGenTypes; - class CGFunctionInfo; - class CGRecordLayout; - class CGBlockInfo; - class CGCXXABI; - class BlockFlags; - class BlockFieldFlags; +class CodeGenTypes; +class CGFunctionInfo; +class CGRecordLayout; +class CGBlockInfo; +class CGCXXABI; +class BlockFlags; +class BlockFieldFlags; /// The kind of evaluation to perform on values of a particular /// type. Basically, is the code in CGExprScalar, CGExprComplex, or diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index f601bfd4d6b9..955f21a71f44 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -34,125 +34,122 @@ #include "llvm/Transforms/Utils/SpecialCaseList.h" namespace llvm { - class Module; - class Constant; - class ConstantInt; - class Function; - class GlobalValue; - class DataLayout; - class FunctionType; - class LLVMContext; - class IndexedInstrProfReader; +class Module; +class Constant; +class ConstantInt; +class Function; +class GlobalValue; +class DataLayout; +class FunctionType; +class LLVMContext; +class IndexedInstrProfReader; } namespace clang { - class TargetCodeGenInfo; - class ASTContext; - class AtomicType; - class FunctionDecl; - class IdentifierInfo; - class ObjCMethodDecl; - class ObjCImplementationDecl; - class ObjCCategoryImplDecl; - class ObjCProtocolDecl; - class ObjCEncodeExpr; - class BlockExpr; - class CharUnits; - class Decl; - class Expr; - class Stmt; - class InitListExpr; - class StringLiteral; - class NamedDecl; - class ValueDecl; - class VarDecl; - class LangOptions; - class CodeGenOptions; - class DiagnosticsEngine; - class AnnotateAttr; - class CXXDestructorDecl; - class MangleBuffer; - class Module; +class TargetCodeGenInfo; +class ASTContext; +class AtomicType; +class FunctionDecl; +class IdentifierInfo; +class ObjCMethodDecl; +class ObjCImplementationDecl; +class ObjCCategoryImplDecl; +class ObjCProtocolDecl; +class ObjCEncodeExpr; +class BlockExpr; +class CharUnits; +class Decl; +class Expr; +class Stmt; +class InitListExpr; +class StringLiteral; +class NamedDecl; +class ValueDecl; +class VarDecl; +class LangOptions; +class CodeGenOptions; +class DiagnosticsEngine; +class AnnotateAttr; +class CXXDestructorDecl; +class MangleBuffer; +class Module; namespace CodeGen { - class CallArgList; - class CodeGenFunction; - class CodeGenTBAA; - class CGCXXABI; - class CGDebugInfo; - class CGObjCRuntime; - class CGOpenCLRuntime; - class CGOpenMPRuntime; - class CGCUDARuntime; - class BlockFieldFlags; - class FunctionArgList; +class CallArgList; +class CodeGenFunction; +class CodeGenTBAA; +class CGCXXABI; +class CGDebugInfo; +class CGObjCRuntime; +class CGOpenCLRuntime; +class CGOpenMPRuntime; +class CGCUDARuntime; +class BlockFieldFlags; +class FunctionArgList; - struct OrderGlobalInits { - unsigned int priority; - unsigned int lex_order; - OrderGlobalInits(unsigned int p, unsigned int l) +struct OrderGlobalInits { + unsigned int priority; + unsigned int lex_order; + OrderGlobalInits(unsigned int p, unsigned int l) : priority(p), lex_order(l) {} - - bool operator==(const OrderGlobalInits &RHS) const { - return priority == RHS.priority && - lex_order == RHS.lex_order; - } - - bool operator<(const OrderGlobalInits &RHS) const { - return std::tie(priority, lex_order) < - std::tie(RHS.priority, RHS.lex_order); - } + + bool operator==(const OrderGlobalInits &RHS) const { + return priority == RHS.priority && lex_order == RHS.lex_order; + } + + bool operator<(const OrderGlobalInits &RHS) const { + return std::tie(priority, lex_order) < + std::tie(RHS.priority, RHS.lex_order); + } +}; + +struct CodeGenTypeCache { + /// void + llvm::Type *VoidTy; + + /// i8, i16, i32, and i64 + llvm::IntegerType *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty; + /// float, double + llvm::Type *FloatTy, *DoubleTy; + + /// int + llvm::IntegerType *IntTy; + + /// intptr_t, size_t, and ptrdiff_t, which we assume are the same size. + union { + llvm::IntegerType *IntPtrTy; + llvm::IntegerType *SizeTy; + llvm::IntegerType *PtrDiffTy; }; - struct CodeGenTypeCache { - /// void - llvm::Type *VoidTy; - - /// i8, i16, i32, and i64 - llvm::IntegerType *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty; - /// float, double - llvm::Type *FloatTy, *DoubleTy; - - /// int - llvm::IntegerType *IntTy; - - /// intptr_t, size_t, and ptrdiff_t, which we assume are the same size. - union { - llvm::IntegerType *IntPtrTy; - llvm::IntegerType *SizeTy; - llvm::IntegerType *PtrDiffTy; - }; - - /// void* in address space 0 - union { - llvm::PointerType *VoidPtrTy; - llvm::PointerType *Int8PtrTy; - }; - - /// void** in address space 0 - union { - llvm::PointerType *VoidPtrPtrTy; - llvm::PointerType *Int8PtrPtrTy; - }; - - /// The width of a pointer into the generic address space. - unsigned char PointerWidthInBits; - - /// The size and alignment of a pointer into the generic address - /// space. - union { - unsigned char PointerAlignInBytes; - unsigned char PointerSizeInBytes; - unsigned char SizeSizeInBytes; // sizeof(size_t) - }; - - llvm::CallingConv::ID RuntimeCC; - llvm::CallingConv::ID getRuntimeCC() const { - return RuntimeCC; - } + /// void* in address space 0 + union { + llvm::PointerType *VoidPtrTy; + llvm::PointerType *Int8PtrTy; }; + /// void** in address space 0 + union { + llvm::PointerType *VoidPtrPtrTy; + llvm::PointerType *Int8PtrPtrTy; + }; + + /// The width of a pointer into the generic address space. + unsigned char PointerWidthInBits; + + /// The size and alignment of a pointer into the generic address + /// space. + union { + unsigned char PointerAlignInBytes; + unsigned char PointerSizeInBytes; + unsigned char SizeSizeInBytes; // sizeof(size_t) + }; + + llvm::CallingConv::ID RuntimeCC; + llvm::CallingConv::ID getRuntimeCC() const { return RuntimeCC; } +}; + struct RREntrypoints { RREntrypoints() { memset(this, 0, sizeof(*this)); } /// void objc_autoreleasePoolPop(void*);