From: Rafael Espindola Date: Fri, 9 May 2014 00:57:59 +0000 (+0000) Subject: Don't indent in namespaces. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=258ff3162c89ed87f6421e241e3319c1994e477b;p=clang Don't indent in namespaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208384 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 73f6b68e8d..6af7a98d96 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/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/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index f601bfd4d6..955f21a71f 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/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; - - struct OrderGlobalInits { - unsigned int priority; - unsigned int lex_order; - OrderGlobalInits(unsigned int p, unsigned int l) +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) : 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*);