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

Unified Diff: src/IceCfg.h

Issue 656123003: Subzero: Class definition cleanup. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes for Karl Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.h
diff --git a/src/IceCfg.h b/src/IceCfg.h
index 4e7f60211cf3ef8b4075e452a73e1d77a1584e9e..414a8e14f7be4ddf7ae52b510ec8632cf32cedb9 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -28,6 +28,9 @@
namespace Ice {
class Cfg {
+ Cfg(const Cfg &) = delete;
+ Cfg &operator=(const Cfg &) = delete;
+
public:
Cfg(GlobalContext *Ctx);
~Cfg();
@@ -67,15 +70,13 @@ public:
// Manage Variables.
// Create a new Variable with a particular type and an optional
// name. The Node argument is the node where the variable is defined.
- template <typename T> T *makeVariable(Type Ty, const IceString &Name = "") {
+ template <typename T = Variable>
+ T *makeVariable(Type Ty, const IceString &Name = "") {
SizeT Index = Variables.size();
T *Var = T::create(this, Ty, Index, Name);
Variables.push_back(Var);
return Var;
}
- // TODO(stichnot): Remove this function with C++11, and use default
- // argument <typename T=Variable> above.
- Variable *makeVariable(Type Ty, const IceString &Name = "");
SizeT getNumVariables() const { return Variables.size(); }
const VarList &getVariables() const { return Variables; }
@@ -187,9 +188,6 @@ private:
// register allocation, resetCurrentNode() should be called to avoid
// spurious validation failures.
const CfgNode *CurrentNode;
-
- Cfg(const Cfg &) = delete;
- Cfg &operator=(const Cfg &) = delete;
};
} // end of namespace Ice
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698