Subzero: Improve class definition hygiene.
Delete zero-argument ctor where possible.
Delete default copy ctor and default assignment operator where possible (some were missed in the past).
(The above are not done to the cross tests because we aren't yet building them with C++11.)
Declare single-argument ctor as "explicit".
BUG= none
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/952953002
diff --git a/src/IceGlobalInits.h b/src/IceGlobalInits.h
index 36d4612..d51d587 100644
--- a/src/IceGlobalInits.h
+++ b/src/IceGlobalInits.h
@@ -30,6 +30,7 @@
/// Base class for global variable and function declarations.
class GlobalDeclaration {
+ GlobalDeclaration() = delete;
GlobalDeclaration(const GlobalDeclaration &) = delete;
GlobalDeclaration &operator=(const GlobalDeclaration &) = delete;
@@ -89,6 +90,7 @@
// Models a function declaration. This includes the type signature of
// the function, its calling conventions, and its linkage.
class FunctionDeclaration : public GlobalDeclaration {
+ FunctionDeclaration() = delete;
FunctionDeclaration(const FunctionDeclaration &) = delete;
FunctionDeclaration &operator=(const FunctionDeclaration &) = delete;