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

Side by Side Diff: src/IceCompileServer.h

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 5 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
OLDNEW
1 //===- subzero/src/IceCompileServer.h - Compile server ----------*- C++ -*-===// 1 //===- subzero/src/IceCompileServer.h - Compile server ----------*- 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 /// \file 10 /// \file
(...skipping 26 matching lines...) Expand all
37 /// 37 ///
38 /// When run on the commandline, it receives and therefore dispatches 38 /// When run on the commandline, it receives and therefore dispatches
39 /// the request immediately. When run in the browser, it blocks waiting 39 /// the request immediately. When run in the browser, it blocks waiting
40 /// for a request. 40 /// for a request.
41 class CompileServer { 41 class CompileServer {
42 CompileServer() = delete; 42 CompileServer() = delete;
43 CompileServer(const CompileServer &) = delete; 43 CompileServer(const CompileServer &) = delete;
44 CompileServer &operator=(const CompileServer &) = delete; 44 CompileServer &operator=(const CompileServer &) = delete;
45 45
46 public: 46 public:
47 explicit CompileServer(Compiler &Comp) : Comp(Comp) {} 47 explicit CompileServer(Compiler &MyComp) : Comp(MyComp) {}
48 48
49 virtual ~CompileServer() = default; 49 virtual ~CompileServer() = default;
50 50
51 virtual void run() = 0; 51 virtual void run() = 0;
52 52
53 virtual ErrorCode &getErrorCode() { return LastError; } 53 virtual ErrorCode &getErrorCode() { return LastError; }
54 void transferErrorCode(ErrorCodes Code) { LastError.assign(Code); } 54 void transferErrorCode(ErrorCodes Code) { LastError.assign(Code); }
55 55
56 protected: 56 protected:
57 Compiler &getCompiler() const { return Comp; } 57 Compiler &getCompiler() const { return Comp; }
58 58
59 Compiler &Comp; 59 Compiler &Comp;
60 ErrorCode LastError; 60 ErrorCode LastError;
61 }; 61 };
62 62
63 /// Commandline variant of the compile server. 63 /// Commandline variant of the compile server.
64 class CLCompileServer : public CompileServer { 64 class CLCompileServer : public CompileServer {
65 CLCompileServer() = delete; 65 CLCompileServer() = delete;
66 CLCompileServer(const CLCompileServer &) = delete; 66 CLCompileServer(const CLCompileServer &) = delete;
67 CLCompileServer &operator=(const CLCompileServer &) = delete; 67 CLCompileServer &operator=(const CLCompileServer &) = delete;
68 68
69 public: 69 public:
70 CLCompileServer(Compiler &Comp, int argc, char **argv) 70 CLCompileServer(Compiler &Comp, int MyArgc, char **MyArgv)
71 : CompileServer(Comp), argc(argc), argv(argv) {} 71 : CompileServer(Comp), argc(MyArgc), argv(MyArgv) {}
72 72
73 ~CLCompileServer() final = default; 73 ~CLCompileServer() final = default;
74 74
75 void run() final; 75 void run() final;
76 76
77 private: 77 private:
78 int argc; 78 int argc;
79 char **argv; 79 char **argv;
80 std::unique_ptr<GlobalContext> Ctx; 80 std::unique_ptr<GlobalContext> Ctx;
81 }; 81 };
82 82
83 } // end of namespace Ice 83 } // end of namespace Ice
84 84
85 #endif // SUBZERO_SRC_ICECOMPILESERVER_H 85 #endif // SUBZERO_SRC_ICECOMPILESERVER_H
OLDNEW
« no previous file with comments | « src/IceClFlagsExtra.h ('k') | src/IceCompileServer.cpp » ('j') | src/IceConverter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698