Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: src/IceGlobalInits.h

Issue 877003003: Subzero: Use a "known" version of clang-format. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a clang-format blacklist. Fix formatting "errors". Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceGlobalInits.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceGlobalInits.h - Global declarations -------*- C++ -*-===// 1 //===- subzero/src/IceGlobalInits.h - Global declarations -------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares the representation of function declarations, 10 // This file declares the representation of function declarations,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 ~FunctionDeclaration() final {} 100 ~FunctionDeclaration() final {}
101 const FuncSigType &getSignature() const { return Signature; } 101 const FuncSigType &getSignature() const { return Signature; }
102 llvm::CallingConv::ID getCallingConv() const { return CallingConv; } 102 llvm::CallingConv::ID getCallingConv() const { return CallingConv; }
103 // isProto implies that there isn't a (local) definition for the function. 103 // isProto implies that there isn't a (local) definition for the function.
104 bool isProto() const { return IsProto; } 104 bool isProto() const { return IsProto; }
105 static bool classof(const GlobalDeclaration *Addr) { 105 static bool classof(const GlobalDeclaration *Addr) {
106 return Addr->getKind() == FunctionDeclarationKind; 106 return Addr->getKind() == FunctionDeclarationKind;
107 } 107 }
108 void dumpType(Ostream &Stream) const final; 108 void dumpType(Ostream &Stream) const final;
109 void dump(GlobalContext *Ctx, Ostream &Stream) const final; 109 void dump(GlobalContext *Ctx, Ostream &Stream) const final;
110 bool getSuppressMangling() const final { 110 bool getSuppressMangling() const final { return isExternal() && IsProto; }
111 return isExternal() && IsProto;
112 }
113 111
114 private: 112 private:
115 const Ice::FuncSigType Signature; 113 const Ice::FuncSigType Signature;
116 llvm::CallingConv::ID CallingConv; 114 llvm::CallingConv::ID CallingConv;
117 bool IsProto; 115 bool IsProto;
118 116
119 FunctionDeclaration(const FuncSigType &Signature, 117 FunctionDeclaration(const FuncSigType &Signature,
120 llvm::CallingConv::ID CallingConv, 118 llvm::CallingConv::ID CallingConv,
121 llvm::GlobalValue::LinkageTypes Linkage, bool IsProto) 119 llvm::GlobalValue::LinkageTypes Linkage, bool IsProto)
122 : GlobalDeclaration(FunctionDeclarationKind, Linkage), 120 : GlobalDeclaration(FunctionDeclarationKind, Linkage),
123 Signature(Signature), CallingConv(CallingConv), IsProto(IsProto) {} 121 Signature(Signature), CallingConv(CallingConv), IsProto(IsProto) {}
124 }; 122 };
125 123
126 /// Models a global variable declaration, and its initializers. 124 /// Models a global variable declaration, and its initializers.
127 class VariableDeclaration : public GlobalDeclaration { 125 class VariableDeclaration : public GlobalDeclaration {
128 VariableDeclaration(const VariableDeclaration &) = delete; 126 VariableDeclaration(const VariableDeclaration &) = delete;
129 VariableDeclaration &operator=(const VariableDeclaration &) = delete; 127 VariableDeclaration &operator=(const VariableDeclaration &) = delete;
128
130 public: 129 public:
131 /// Base class for a global variable initializer. 130 /// Base class for a global variable initializer.
132 class Initializer { 131 class Initializer {
133 Initializer(const Initializer &) = delete; 132 Initializer(const Initializer &) = delete;
134 Initializer &operator=(const Initializer &) = delete; 133 Initializer &operator=(const Initializer &) = delete;
135 134
136 public: 135 public:
137 /// Discriminator for LLVM-style RTTI. 136 /// Discriminator for LLVM-style RTTI.
138 enum InitializerKind { 137 enum InitializerKind {
139 DataInitializerKind, 138 DataInitializerKind,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 template <class StreamType> 311 template <class StreamType>
313 inline StreamType &operator<<(StreamType &Stream, 312 inline StreamType &operator<<(StreamType &Stream,
314 const GlobalDeclaration &Addr) { 313 const GlobalDeclaration &Addr) {
315 Addr.dump(Stream); 314 Addr.dump(Stream);
316 return Stream; 315 return Stream;
317 } 316 }
318 317
319 } // end of namespace Ice 318 } // end of namespace Ice
320 319
321 #endif // SUBZERO_SRC_ICEGLOBALINITS_H 320 #endif // SUBZERO_SRC_ICEGLOBALINITS_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceGlobalInits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698