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/crosstest/vectors.h b/crosstest/vectors.h
index 2fdb482..e4c163e 100644
--- a/crosstest/vectors.h
+++ b/crosstest/vectors.h
@@ -100,7 +100,7 @@
 // TODO: Replace with a portable PRNG from C++11.
 class PRNG {
 public:
-  PRNG(uint32_t Seed = 1) : State(Seed) {}
+  explicit PRNG(uint32_t Seed = 1) : State(Seed) {}
 
   uint32_t operator()() {
     // Lewis, Goodman, and Miller (1969)
diff --git a/src/IceAPInt.h b/src/IceAPInt.h
index 1789dd5..01ce280 100644
--- a/src/IceAPInt.h
+++ b/src/IceAPInt.h
@@ -9,7 +9,7 @@
 ///
 /// \file
 /// \brief This file implements a class to represent 64 bit integer constant
-/// values, and thier conversion to variable bit sized integers.
+/// values, and their conversion to variable bit sized integers.
 ///
 /// Note: This is a simplified version of llvm/include/llvm/ADT/APInt.h for use
 /// with Subzero.
@@ -23,6 +23,10 @@
 namespace Ice {
 
 class APInt {
+  APInt() = delete;
+  APInt(const APInt &) = delete;
+  APInt &operator=(const APInt &) = delete;
+
 public:
   /// Bits in an (internal) value.
   static const SizeT APINT_BITS_PER_WORD = sizeof(uint64_t) * CHAR_BIT;
diff --git a/src/IceCfg.h b/src/IceCfg.h
index 737bb64..b4c3748 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -24,6 +24,7 @@
 namespace Ice {
 
 class Cfg {
+  Cfg() = delete;
   Cfg(const Cfg &) = delete;
   Cfg &operator=(const Cfg &) = delete;
 
diff --git a/src/IceCfgNode.h b/src/IceCfgNode.h
index e3c3ee7..3b5aff3 100644
--- a/src/IceCfgNode.h
+++ b/src/IceCfgNode.h
@@ -22,6 +22,7 @@
 namespace Ice {
 
 class CfgNode {
+  CfgNode() = delete;
   CfgNode(const CfgNode &) = delete;
   CfgNode &operator=(const CfgNode &) = delete;
 
diff --git a/src/IceConditionCodesX8632.h b/src/IceConditionCodesX8632.h
index a930bf8..77dd4c7 100644
--- a/src/IceConditionCodesX8632.h
+++ b/src/IceConditionCodesX8632.h
@@ -20,6 +20,10 @@
 namespace Ice {
 
 class CondX86 {
+  CondX86() = delete;
+  CondX86(const CondX86 &) = delete;
+  CondX86 &operator=(const CondX86 &) = delete;
+
 public:
   // An enum of condition codes used for branches and cmov. The enum value
   // should match the value used to encode operands in binary instructions.
diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp
index cc523fa..111a52b 100644
--- a/src/IceConverter.cpp
+++ b/src/IceConverter.cpp
@@ -53,11 +53,12 @@
 // respect to Translator.  In particular, the unique_ptr ownership
 // rules in LLVM2ICEFunctionConverter.
 class LLVM2ICEConverter {
+  LLVM2ICEConverter() = delete;
   LLVM2ICEConverter(const LLVM2ICEConverter &) = delete;
   LLVM2ICEConverter &operator=(const LLVM2ICEConverter &) = delete;
 
 public:
-  LLVM2ICEConverter(Ice::Converter &Converter)
+  explicit LLVM2ICEConverter(Ice::Converter &Converter)
       : Converter(Converter), Ctx(Converter.getContext()),
         TypeConverter(Converter.getModule()->getContext()) {}
 
@@ -75,12 +76,13 @@
 // Note: this currently assumes that the given IR was verified to be
 // valid PNaCl bitcode. Otherwise, the behavior is undefined.
 class LLVM2ICEFunctionConverter : LLVM2ICEConverter {
+  LLVM2ICEFunctionConverter() = delete;
   LLVM2ICEFunctionConverter(const LLVM2ICEFunctionConverter &) = delete;
   LLVM2ICEFunctionConverter &
   operator=(const LLVM2ICEFunctionConverter &) = delete;
 
 public:
-  LLVM2ICEFunctionConverter(Ice::Converter &Converter)
+  explicit LLVM2ICEFunctionConverter(Ice::Converter &Converter)
       : LLVM2ICEConverter(Converter), Func(nullptr) {}
 
   void convertFunction(const Function *F) {
@@ -651,12 +653,13 @@
 // Note: this currently assumes that the given IR was verified to be
 // valid PNaCl bitcode. Othewise, the behavior is undefined.
 class LLVM2ICEGlobalsConverter : public LLVM2ICEConverter {
+  LLVM2ICEGlobalsConverter() = delete;
   LLVM2ICEGlobalsConverter(const LLVM2ICEGlobalsConverter &) = delete;
   LLVM2ICEGlobalsConverter &
   operator-(const LLVM2ICEGlobalsConverter &) = delete;
 
 public:
-  LLVM2ICEGlobalsConverter(Ice::Converter &Converter)
+  explicit LLVM2ICEGlobalsConverter(Ice::Converter &Converter)
       : LLVM2ICEConverter(Converter) {}
 
   /// Converts global variables, and their initializers into ICE
diff --git a/src/IceConverter.h b/src/IceConverter.h
index 26b647c..208b085 100644
--- a/src/IceConverter.h
+++ b/src/IceConverter.h
@@ -25,6 +25,7 @@
 namespace Ice {
 
 class Converter : public Translator {
+  Converter() = delete;
   Converter(const Converter &) = delete;
   Converter &operator=(const Converter &) = delete;
 
diff --git a/src/IceELFObjectWriter.h b/src/IceELFObjectWriter.h
index 6c44ed5..d27ee9c 100644
--- a/src/IceELFObjectWriter.h
+++ b/src/IceELFObjectWriter.h
@@ -48,6 +48,7 @@
 // file. Having both -fdata-sections and -ffunction-sections does allow
 // relaxing this requirement.
 class ELFObjectWriter {
+  ELFObjectWriter() = delete;
   ELFObjectWriter(const ELFObjectWriter &) = delete;
   ELFObjectWriter &operator=(const ELFObjectWriter &) = delete;
 
diff --git a/src/IceELFSection.h b/src/IceELFSection.h
index 535d153..0bfccca 100644
--- a/src/IceELFSection.h
+++ b/src/IceELFSection.h
@@ -28,6 +28,7 @@
 
 // Base representation of an ELF section.
 class ELFSection {
+  ELFSection() = delete;
   ELFSection(const ELFSection &) = delete;
   ELFSection &operator=(const ELFSection &) = delete;
 
@@ -97,6 +98,7 @@
 // Models text/code sections. Code is written out incrementally and the
 // size of the section is then updated incrementally.
 class ELFTextSection : public ELFSection {
+  ELFTextSection() = delete;
   ELFTextSection(const ELFTextSection &) = delete;
   ELFTextSection &operator=(const ELFTextSection &) = delete;
 
@@ -110,6 +112,7 @@
 // size of the section is then updated incrementally.
 // Some rodata sections may have fixed entsize and duplicates may be mergeable.
 class ELFDataSection : public ELFSection {
+  ELFDataSection() = delete;
   ELFDataSection(const ELFDataSection &) = delete;
   ELFDataSection &operator=(const ELFDataSection &) = delete;
 
@@ -155,6 +158,10 @@
 // Models a symbol table. Symbols may be added up until updateIndices is
 // called. At that point the indices of each symbol will be finalized.
 class ELFSymbolTableSection : public ELFSection {
+  ELFSymbolTableSection() = delete;
+  ELFSymbolTableSection(const ELFSymbolTableSection &) = delete;
+  ELFSymbolTableSection &operator=(const ELFSymbolTableSection &) = delete;
+
 public:
   using ELFSection::ELFSection;
 
@@ -199,6 +206,7 @@
 
 // Models a relocation section.
 class ELFRelocationSection : public ELFSection {
+  ELFRelocationSection() = delete;
   ELFRelocationSection(const ELFRelocationSection &) = delete;
   ELFRelocationSection &operator=(const ELFRelocationSection &) = delete;
 
@@ -237,6 +245,7 @@
 // can be discovered and used to fill out section headers and symbol
 // table entries.
 class ELFStringTableSection : public ELFSection {
+  ELFStringTableSection() = delete;
   ELFStringTableSection(const ELFStringTableSection &) = delete;
   ELFStringTableSection &operator=(const ELFStringTableSection &) = delete;
 
diff --git a/src/IceELFStreamer.h b/src/IceELFStreamer.h
index ce70e86..50e4dd7 100644
--- a/src/IceELFStreamer.h
+++ b/src/IceELFStreamer.h
@@ -22,6 +22,10 @@
 // Low level writer that can that can handle ELFCLASS32/64.
 // Little endian only for now.
 class ELFStreamer {
+  ELFStreamer() = delete;
+  ELFStreamer(const ELFStreamer &) = delete;
+  ELFStreamer &operator=(const ELFStreamer &) = delete;
+
 public:
   explicit ELFStreamer(Fdstream &Out) : Out(Out) {}
 
diff --git a/src/IceFixups.h b/src/IceFixups.h
index b52572f..bbe7d4a 100644
--- a/src/IceFixups.h
+++ b/src/IceFixups.h
@@ -25,7 +25,11 @@
 // Assembler fixups are positions in generated code/data that hold relocation
 // information that needs to be processed before finalizing the code/data.
 struct AssemblerFixup {
+  AssemblerFixup &operator=(const AssemblerFixup &) = delete;
+
 public:
+  AssemblerFixup() : position_(0), kind_(0), value_(nullptr) {}
+  AssemblerFixup(const AssemblerFixup &) = default;
   intptr_t position() const { return position_; }
   void set_position(intptr_t Position) { position_ = Position; }
 
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index f7f5a5a..ec821c0 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -58,6 +58,7 @@
 };
 
 class GlobalContext {
+  GlobalContext() = delete;
   GlobalContext(const GlobalContext &) = delete;
   GlobalContext &operator=(const GlobalContext &) = delete;
 
@@ -100,7 +101,11 @@
   // TimerList is a vector of TimerStack objects, with extra methods
   // to initialize and merge these vectors.
   class TimerList : public std::vector<TimerStack> {
+    TimerList(const TimerList &) = delete;
+    TimerList &operator=(const TimerList &) = delete;
+
   public:
+    TimerList() = default;
     // initInto() initializes a target list of timers based on the
     // current list.  In particular, it creates the same number of
     // timers, in the same order, with the same names, but initially
@@ -457,6 +462,7 @@
 // pushes a marker, and the destructor pops it.  This is for
 // convenient timing of regions of code.
 class TimerMarker {
+  TimerMarker() = delete;
   TimerMarker(const TimerMarker &) = delete;
   TimerMarker &operator=(const TimerMarker &) = delete;
 
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;
 
diff --git a/src/IceInst.h b/src/IceInst.h
index 72422c9..e3262c8 100644
--- a/src/IceInst.h
+++ b/src/IceInst.h
@@ -35,6 +35,7 @@
 // from InstHighLevel, and low-level (target-specific) ICE
 // instructions inherit from InstTarget.
 class Inst : public llvm::ilist_node<Inst> {
+  Inst() = delete;
   Inst(const Inst &) = delete;
   Inst &operator=(const Inst &) = delete;
 
@@ -44,7 +45,6 @@
     Unreachable,
     Alloca,
     Arithmetic,
-    Assign, // not part of LLVM/PNaCl bitcode
     Br,
     Call,
     Cast,
@@ -59,6 +59,7 @@
     Select,
     Store,
     Switch,
+    Assign,       // not part of LLVM/PNaCl bitcode
     BundleLock,   // not part of LLVM/PNaCl bitcode
     BundleUnlock, // not part of LLVM/PNaCl bitcode
     FakeDef,      // not part of LLVM/PNaCl bitcode
@@ -207,6 +208,7 @@
 };
 
 class InstHighLevel : public Inst {
+  InstHighLevel() = delete;
   InstHighLevel(const InstHighLevel &) = delete;
   InstHighLevel &operator=(const InstHighLevel &) = delete;
 
@@ -226,6 +228,7 @@
 // and the required alignment in bytes.  The alignment must be either
 // 0 (no alignment required) or a power of 2.
 class InstAlloca : public InstHighLevel {
+  InstAlloca() = delete;
   InstAlloca(const InstAlloca &) = delete;
   InstAlloca &operator=(const InstAlloca &) = delete;
 
@@ -250,6 +253,7 @@
 // Binary arithmetic instruction.  The source operands are captured in
 // getSrc(0) and getSrc(1).
 class InstArithmetic : public InstHighLevel {
+  InstArithmetic() = delete;
   InstArithmetic(const InstArithmetic &) = delete;
   InstArithmetic &operator=(const InstArithmetic &) = delete;
 
@@ -289,6 +293,7 @@
 // Inttoptr instruction, or as an intermediate step for lowering a
 // Load instruction.
 class InstAssign : public InstHighLevel {
+  InstAssign() = delete;
   InstAssign(const InstAssign &) = delete;
   InstAssign &operator=(const InstAssign &) = delete;
 
@@ -308,6 +313,7 @@
 // Branch instruction.  This represents both conditional and
 // unconditional branches.
 class InstBr : public InstHighLevel {
+  InstBr() = delete;
   InstBr(const InstBr &) = delete;
   InstBr &operator=(const InstBr &) = delete;
 
@@ -354,6 +360,7 @@
 // Call instruction.  The call target is captured as getSrc(0), and
 // arg I is captured as getSrc(I+1).
 class InstCall : public InstHighLevel {
+  InstCall() = delete;
   InstCall(const InstCall &) = delete;
   InstCall &operator=(const InstCall &) = delete;
 
@@ -392,6 +399,7 @@
 
 // Cast instruction (a.k.a. conversion operation).
 class InstCast : public InstHighLevel {
+  InstCast() = delete;
   InstCast(const InstCast &) = delete;
   InstCast &operator=(const InstCast &) = delete;
 
@@ -422,6 +430,7 @@
 
 // ExtractElement instruction.
 class InstExtractElement : public InstHighLevel {
+  InstExtractElement() = delete;
   InstExtractElement(const InstExtractElement &) = delete;
   InstExtractElement &operator=(const InstExtractElement &) = delete;
 
@@ -446,6 +455,7 @@
 // Floating-point comparison instruction.  The source operands are
 // captured in getSrc(0) and getSrc(1).
 class InstFcmp : public InstHighLevel {
+  InstFcmp() = delete;
   InstFcmp(const InstFcmp &) = delete;
   InstFcmp &operator=(const InstFcmp &) = delete;
 
@@ -476,6 +486,7 @@
 // Integer comparison instruction.  The source operands are captured
 // in getSrc(0) and getSrc(1).
 class InstIcmp : public InstHighLevel {
+  InstIcmp() = delete;
   InstIcmp(const InstIcmp &) = delete;
   InstIcmp &operator=(const InstIcmp &) = delete;
 
@@ -505,6 +516,7 @@
 
 // InsertElement instruction.
 class InstInsertElement : public InstHighLevel {
+  InstInsertElement() = delete;
   InstInsertElement(const InstInsertElement &) = delete;
   InstInsertElement &operator=(const InstInsertElement &) = delete;
 
@@ -529,6 +541,7 @@
 // Call to an intrinsic function.  The call target is captured as getSrc(0),
 // and arg I is captured as getSrc(I+1).
 class InstIntrinsicCall : public InstCall {
+  InstIntrinsicCall() = delete;
   InstIntrinsicCall(const InstIntrinsicCall &) = delete;
   InstIntrinsicCall &operator=(const InstIntrinsicCall &) = delete;
 
@@ -557,6 +570,7 @@
 
 // Load instruction.  The source address is captured in getSrc(0).
 class InstLoad : public InstHighLevel {
+  InstLoad() = delete;
   InstLoad(const InstLoad &) = delete;
   InstLoad &operator=(const InstLoad &) = delete;
 
@@ -579,6 +593,7 @@
 // Phi instruction.  For incoming edge I, the node is Labels[I] and
 // the Phi source operand is getSrc(I).
 class InstPhi : public InstHighLevel {
+  InstPhi() = delete;
   InstPhi(const InstPhi &) = delete;
   InstPhi &operator=(const InstPhi &) = delete;
 
@@ -613,6 +628,7 @@
 // there is no return value (void-type function), then
 // getSrcSize()==0 and hasRetValue()==false.
 class InstRet : public InstHighLevel {
+  InstRet() = delete;
   InstRet(const InstRet &) = delete;
   InstRet &operator=(const InstRet &) = delete;
 
@@ -636,6 +652,7 @@
 
 // Select instruction.  The condition, true, and false operands are captured.
 class InstSelect : public InstHighLevel {
+  InstSelect() = delete;
   InstSelect(const InstSelect &) = delete;
   InstSelect &operator=(const InstSelect &) = delete;
 
@@ -660,6 +677,7 @@
 // Store instruction.  The address operand is captured, along with the
 // data operand to be stored into the address.
 class InstStore : public InstHighLevel {
+  InstStore() = delete;
   InstStore(const InstStore &) = delete;
   InstStore &operator=(const InstStore &) = delete;
 
@@ -683,6 +701,7 @@
 // Switch instruction.  The single source operand is captured as
 // getSrc(0).
 class InstSwitch : public InstHighLevel {
+  InstSwitch() = delete;
   InstSwitch(const InstSwitch &) = delete;
   InstSwitch &operator=(const InstSwitch &) = delete;
 
@@ -727,6 +746,7 @@
 // Unreachable instruction.  This is a terminator instruction with no
 // operands.
 class InstUnreachable : public InstHighLevel {
+  InstUnreachable() = delete;
   InstUnreachable(const InstUnreachable &) = delete;
   InstUnreachable &operator=(const InstUnreachable &) = delete;
 
@@ -741,13 +761,14 @@
   }
 
 private:
-  InstUnreachable(Cfg *Func);
+  explicit InstUnreachable(Cfg *Func);
   ~InstUnreachable() override {}
 };
 
 // BundleLock instruction.  There are no operands.  Contains an option
 // indicating whether align_to_end is specified.
 class InstBundleLock : public InstHighLevel {
+  InstBundleLock() = delete;
   InstBundleLock(const InstBundleLock &) = delete;
   InstBundleLock &operator=(const InstBundleLock &) = delete;
 
@@ -773,6 +794,7 @@
 
 // BundleUnlock instruction.  There are no operands.
 class InstBundleUnlock : public InstHighLevel {
+  InstBundleUnlock() = delete;
   InstBundleUnlock(const InstBundleUnlock &) = delete;
   InstBundleUnlock &operator=(const InstBundleUnlock &) = delete;
 
@@ -805,6 +827,7 @@
 // eliminated if its dest operand is unused, and therefore the FakeDef
 // dest wouldn't be properly initialized.
 class InstFakeDef : public InstHighLevel {
+  InstFakeDef() = delete;
   InstFakeDef(const InstFakeDef &) = delete;
   InstFakeDef &operator=(const InstFakeDef &) = delete;
 
@@ -829,6 +852,7 @@
 // situations.  The FakeUse instruction has no dest, so it can itself
 // never be dead-code eliminated.
 class InstFakeUse : public InstHighLevel {
+  InstFakeUse() = delete;
   InstFakeUse(const InstFakeUse &) = delete;
   InstFakeUse &operator=(const InstFakeUse &) = delete;
 
@@ -857,6 +881,7 @@
 // that kills the set of variables, so that if that linked instruction
 // gets dead-code eliminated, the FakeKill instruction will as well.
 class InstFakeKill : public InstHighLevel {
+  InstFakeKill() = delete;
   InstFakeKill(const InstFakeKill &) = delete;
   InstFakeKill &operator=(const InstFakeKill &) = delete;
 
@@ -881,6 +906,7 @@
 // The Target instruction is the base class for all target-specific
 // instructions.
 class InstTarget : public Inst {
+  InstTarget() = delete;
   InstTarget(const InstTarget &) = delete;
   InstTarget &operator=(const InstTarget &) = delete;
 
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index ed4924f..c86128d 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -30,6 +30,7 @@
 // OperandX8632 extends the Operand hierarchy.  Its subclasses are
 // OperandX8632Mem and VariableSplit.
 class OperandX8632 : public Operand {
+  OperandX8632() = delete;
   OperandX8632(const OperandX8632 &) = delete;
   OperandX8632 &operator=(const OperandX8632 &) = delete;
 
@@ -51,6 +52,7 @@
 // base and index registers, a constant offset, and a fixed shift
 // value for the index register.
 class OperandX8632Mem : public OperandX8632 {
+  OperandX8632Mem() = delete;
   OperandX8632Mem(const OperandX8632Mem &) = delete;
   OperandX8632Mem &operator=(const OperandX8632Mem &) = delete;
 
@@ -102,6 +104,7 @@
 // lowering forces the f64 to be spilled to the stack and then
 // accesses through the VariableSplit.
 class VariableSplit : public OperandX8632 {
+  VariableSplit() = delete;
   VariableSplit(const VariableSplit &) = delete;
   VariableSplit &operator=(const VariableSplit &) = delete;
 
@@ -141,6 +144,7 @@
 // register.  If the linked Variable has a stack slot, then the
 // Variable and SpillVariable share that slot.
 class SpillVariable : public Variable {
+  SpillVariable() = delete;
   SpillVariable(const SpillVariable &) = delete;
   SpillVariable &operator=(const SpillVariable &) = delete;
 
@@ -163,6 +167,7 @@
 };
 
 class InstX8632 : public InstTarget {
+  InstX8632() = delete;
   InstX8632(const InstX8632 &) = delete;
   InstX8632 &operator=(const InstX8632 &) = delete;
 
@@ -308,6 +313,7 @@
 // it may be prevented by running dead code elimination before
 // lowering.
 class InstX8632Label : public InstX8632 {
+  InstX8632Label() = delete;
   InstX8632Label(const InstX8632Label &) = delete;
   InstX8632Label &operator=(const InstX8632Label &) = delete;
 
@@ -330,6 +336,7 @@
 
 // Conditional and unconditional branch instruction.
 class InstX8632Br : public InstX8632 {
+  InstX8632Br() = delete;
   InstX8632Br(const InstX8632Br &) = delete;
   InstX8632Br &operator=(const InstX8632Br &) = delete;
 
@@ -405,6 +412,7 @@
 // naclret, unreachable.  This is different from a Branch instruction
 // in that there is no intra-function control flow to represent.
 class InstX8632Jmp : public InstX8632 {
+  InstX8632Jmp() = delete;
   InstX8632Jmp(const InstX8632Jmp &) = delete;
   InstX8632Jmp &operator=(const InstX8632Jmp &) = delete;
 
@@ -425,6 +433,7 @@
 // AdjustStack instruction - subtracts esp by the given amount and
 // updates the stack offset during code emission.
 class InstX8632AdjustStack : public InstX8632 {
+  InstX8632AdjustStack() = delete;
   InstX8632AdjustStack(const InstX8632AdjustStack &) = delete;
   InstX8632AdjustStack &operator=(const InstX8632AdjustStack &) = delete;
 
@@ -445,6 +454,7 @@
 
 // Call instruction.  Arguments should have already been pushed.
 class InstX8632Call : public InstX8632 {
+  InstX8632Call() = delete;
   InstX8632Call(const InstX8632Call &) = delete;
   InstX8632Call &operator=(const InstX8632Call &) = delete;
 
@@ -471,6 +481,7 @@
 // Instructions of the form x := op(x).
 template <InstX8632::InstKindX8632 K>
 class InstX8632InplaceopGPR : public InstX8632 {
+  InstX8632InplaceopGPR() = delete;
   InstX8632InplaceopGPR(const InstX8632InplaceopGPR &) = delete;
   InstX8632InplaceopGPR &operator=(const InstX8632InplaceopGPR &) = delete;
 
@@ -523,6 +534,7 @@
 // Instructions of the form x := op(y).
 template <InstX8632::InstKindX8632 K>
 class InstX8632UnaryopGPR : public InstX8632 {
+  InstX8632UnaryopGPR() = delete;
   InstX8632UnaryopGPR(const InstX8632UnaryopGPR &) = delete;
   InstX8632UnaryopGPR &operator=(const InstX8632UnaryopGPR &) = delete;
 
@@ -582,6 +594,7 @@
 
 template <InstX8632::InstKindX8632 K>
 class InstX8632UnaryopXmm : public InstX8632 {
+  InstX8632UnaryopXmm() = delete;
   InstX8632UnaryopXmm(const InstX8632UnaryopXmm &) = delete;
   InstX8632UnaryopXmm &operator=(const InstX8632UnaryopXmm &) = delete;
 
@@ -636,6 +649,7 @@
 
 template <InstX8632::InstKindX8632 K>
 class InstX8632BinopGPRShift : public InstX8632 {
+  InstX8632BinopGPRShift() = delete;
   InstX8632BinopGPRShift(const InstX8632BinopGPRShift &) = delete;
   InstX8632BinopGPRShift &operator=(const InstX8632BinopGPRShift &) = delete;
 
@@ -680,6 +694,7 @@
 
 template <InstX8632::InstKindX8632 K>
 class InstX8632BinopGPR : public InstX8632 {
+  InstX8632BinopGPR() = delete;
   InstX8632BinopGPR(const InstX8632BinopGPR &) = delete;
   InstX8632BinopGPR &operator=(const InstX8632BinopGPR &) = delete;
 
@@ -723,6 +738,7 @@
 
 template <InstX8632::InstKindX8632 K, bool NeedsElementType>
 class InstX8632BinopXmm : public InstX8632 {
+  InstX8632BinopXmm() = delete;
   InstX8632BinopXmm(const InstX8632BinopXmm &) = delete;
   InstX8632BinopXmm &operator=(const InstX8632BinopXmm &) = delete;
 
@@ -772,6 +788,7 @@
 
 template <InstX8632::InstKindX8632 K>
 class InstX8632BinopXmmShift : public InstX8632 {
+  InstX8632BinopXmmShift() = delete;
   InstX8632BinopXmmShift(const InstX8632BinopXmmShift &) = delete;
   InstX8632BinopXmmShift &operator=(const InstX8632BinopXmmShift &) = delete;
 
@@ -818,6 +835,7 @@
 };
 
 template <InstX8632::InstKindX8632 K> class InstX8632Ternop : public InstX8632 {
+  InstX8632Ternop() = delete;
   InstX8632Ternop(const InstX8632Ternop &) = delete;
   InstX8632Ternop &operator=(const InstX8632Ternop &) = delete;
 
@@ -865,6 +883,7 @@
 // Instructions of the form x := y op z
 template <InstX8632::InstKindX8632 K>
 class InstX8632ThreeAddressop : public InstX8632 {
+  InstX8632ThreeAddressop() = delete;
   InstX8632ThreeAddressop(const InstX8632ThreeAddressop &) = delete;
   InstX8632ThreeAddressop &operator=(const InstX8632ThreeAddressop &) = delete;
 
@@ -913,6 +932,7 @@
 // Base class for assignment instructions
 template <InstX8632::InstKindX8632 K>
 class InstX8632Movlike : public InstX8632 {
+  InstX8632Movlike() = delete;
   InstX8632Movlike(const InstX8632Movlike &) = delete;
   InstX8632Movlike &operator=(const InstX8632Movlike &) = delete;
 
@@ -1018,6 +1038,7 @@
 
 // Base class for a lockable x86-32 instruction (emits a locked prefix).
 class InstX8632Lockable : public InstX8632 {
+  InstX8632Lockable() = delete;
   InstX8632Lockable(const InstX8632Lockable &) = delete;
   InstX8632Lockable &operator=(const InstX8632Lockable &) = delete;
 
@@ -1036,6 +1057,7 @@
 
 // Mul instruction - unsigned multiply.
 class InstX8632Mul : public InstX8632 {
+  InstX8632Mul() = delete;
   InstX8632Mul(const InstX8632Mul &) = delete;
   InstX8632Mul &operator=(const InstX8632Mul &) = delete;
 
@@ -1057,6 +1079,7 @@
 
 // Shld instruction - shift across a pair of operands.
 class InstX8632Shld : public InstX8632 {
+  InstX8632Shld() = delete;
   InstX8632Shld(const InstX8632Shld &) = delete;
   InstX8632Shld &operator=(const InstX8632Shld &) = delete;
 
@@ -1079,6 +1102,7 @@
 
 // Shrd instruction - shift across a pair of operands.
 class InstX8632Shrd : public InstX8632 {
+  InstX8632Shrd() = delete;
   InstX8632Shrd(const InstX8632Shrd &) = delete;
   InstX8632Shrd &operator=(const InstX8632Shrd &) = delete;
 
@@ -1101,6 +1125,7 @@
 
 // Conditional move instruction.
 class InstX8632Cmov : public InstX8632 {
+  InstX8632Cmov() = delete;
   InstX8632Cmov(const InstX8632Cmov &) = delete;
   InstX8632Cmov &operator=(const InstX8632Cmov &) = delete;
 
@@ -1126,6 +1151,7 @@
 // Cmpps instruction - compare packed singled-precision floating point
 // values
 class InstX8632Cmpps : public InstX8632 {
+  InstX8632Cmpps() = delete;
   InstX8632Cmpps(const InstX8632Cmpps &) = delete;
   InstX8632Cmpps &operator=(const InstX8632Cmpps &) = delete;
 
@@ -1154,6 +1180,7 @@
 // <dest> can be a register or memory, while <desired> must be a register.
 // It is the user's responsiblity to mark eax with a FakeDef.
 class InstX8632Cmpxchg : public InstX8632Lockable {
+  InstX8632Cmpxchg() = delete;
   InstX8632Cmpxchg(const InstX8632Cmpxchg &) = delete;
   InstX8632Cmpxchg &operator=(const InstX8632Cmpxchg &) = delete;
 
@@ -1181,6 +1208,7 @@
 // and eax as modified.
 // <m64> must be a memory operand.
 class InstX8632Cmpxchg8b : public InstX8632Lockable {
+  InstX8632Cmpxchg8b() = delete;
   InstX8632Cmpxchg8b(const InstX8632Cmpxchg8b &) = delete;
   InstX8632Cmpxchg8b &operator=(const InstX8632Cmpxchg8b &) = delete;
 
@@ -1207,6 +1235,7 @@
 // from dest/src types.  Sign and zero extension on the integer
 // operand needs to be done separately.
 class InstX8632Cvt : public InstX8632 {
+  InstX8632Cvt() = delete;
   InstX8632Cvt(const InstX8632Cvt &) = delete;
   InstX8632Cvt &operator=(const InstX8632Cvt &) = delete;
 
@@ -1231,6 +1260,7 @@
 
 // cmp - Integer compare instruction.
 class InstX8632Icmp : public InstX8632 {
+  InstX8632Icmp() = delete;
   InstX8632Icmp(const InstX8632Icmp &) = delete;
   InstX8632Icmp &operator=(const InstX8632Icmp &) = delete;
 
@@ -1251,6 +1281,7 @@
 
 // ucomiss/ucomisd - floating-point compare instruction.
 class InstX8632Ucomiss : public InstX8632 {
+  InstX8632Ucomiss() = delete;
   InstX8632Ucomiss(const InstX8632Ucomiss &) = delete;
   InstX8632Ucomiss &operator=(const InstX8632Ucomiss &) = delete;
 
@@ -1271,6 +1302,7 @@
 
 // UD2 instruction.
 class InstX8632UD2 : public InstX8632 {
+  InstX8632UD2() = delete;
   InstX8632UD2(const InstX8632UD2 &) = delete;
   InstX8632UD2 &operator=(const InstX8632UD2 &) = delete;
 
@@ -1284,12 +1316,13 @@
   static bool classof(const Inst *Inst) { return isClassof(Inst, UD2); }
 
 private:
-  InstX8632UD2(Cfg *Func);
+  explicit InstX8632UD2(Cfg *Func);
   ~InstX8632UD2() override {}
 };
 
 // Test instruction.
 class InstX8632Test : public InstX8632 {
+  InstX8632Test() = delete;
   InstX8632Test(const InstX8632Test &) = delete;
   InstX8632Test &operator=(const InstX8632Test &) = delete;
 
@@ -1310,6 +1343,7 @@
 
 // Mfence instruction.
 class InstX8632Mfence : public InstX8632 {
+  InstX8632Mfence() = delete;
   InstX8632Mfence(const InstX8632Mfence &) = delete;
   InstX8632Mfence &operator=(const InstX8632Mfence &) = delete;
 
@@ -1323,7 +1357,7 @@
   static bool classof(const Inst *Inst) { return isClassof(Inst, Mfence); }
 
 private:
-  InstX8632Mfence(Cfg *Func);
+  explicit InstX8632Mfence(Cfg *Func);
   ~InstX8632Mfence() override {}
 };
 
@@ -1331,6 +1365,7 @@
 // operand instead of Variable as the destination.  It's important
 // for liveness that there is no Dest operand.
 class InstX8632Store : public InstX8632 {
+  InstX8632Store() = delete;
   InstX8632Store(const InstX8632Store &) = delete;
   InstX8632Store &operator=(const InstX8632Store &) = delete;
 
@@ -1354,6 +1389,7 @@
 // for liveness that there is no Dest operand. The source must be an
 // Xmm register, since Dest is mem.
 class InstX8632StoreP : public InstX8632 {
+  InstX8632StoreP() = delete;
   InstX8632StoreP(const InstX8632StoreP &) = delete;
   InstX8632StoreP &operator=(const InstX8632StoreP &) = delete;
 
@@ -1374,6 +1410,7 @@
 };
 
 class InstX8632StoreQ : public InstX8632 {
+  InstX8632StoreQ() = delete;
   InstX8632StoreQ(const InstX8632StoreQ &) = delete;
   InstX8632StoreQ &operator=(const InstX8632StoreQ &) = delete;
 
@@ -1395,6 +1432,7 @@
 
 // Nop instructions of varying length
 class InstX8632Nop : public InstX8632 {
+  InstX8632Nop() = delete;
   InstX8632Nop(const InstX8632Nop &) = delete;
   InstX8632Nop &operator=(const InstX8632Nop &) = delete;
 
@@ -1419,6 +1457,7 @@
 
 // Fld - load a value onto the x87 FP stack.
 class InstX8632Fld : public InstX8632 {
+  InstX8632Fld() = delete;
   InstX8632Fld(const InstX8632Fld &) = delete;
   InstX8632Fld &operator=(const InstX8632Fld &) = delete;
 
@@ -1438,6 +1477,7 @@
 
 // Fstp - store x87 st(0) into memory and pop st(0).
 class InstX8632Fstp : public InstX8632 {
+  InstX8632Fstp() = delete;
   InstX8632Fstp(const InstX8632Fstp &) = delete;
   InstX8632Fstp &operator=(const InstX8632Fstp &) = delete;
 
@@ -1456,6 +1496,7 @@
 };
 
 class InstX8632Pop : public InstX8632 {
+  InstX8632Pop() = delete;
   InstX8632Pop(const InstX8632Pop &) = delete;
   InstX8632Pop &operator=(const InstX8632Pop &) = delete;
 
@@ -1474,6 +1515,7 @@
 };
 
 class InstX8632Push : public InstX8632 {
+  InstX8632Push() = delete;
   InstX8632Push(const InstX8632Push &) = delete;
   InstX8632Push &operator=(const InstX8632Push &) = delete;
 
@@ -1496,6 +1538,7 @@
 // (for non-void returning functions) for liveness analysis, though
 // a FakeUse before the ret would do just as well.
 class InstX8632Ret : public InstX8632 {
+  InstX8632Ret() = delete;
   InstX8632Ret(const InstX8632Ret &) = delete;
   InstX8632Ret &operator=(const InstX8632Ret &) = delete;
 
@@ -1521,6 +1564,7 @@
 // Both the dest and source are updated. The caller should then insert a
 // FakeDef to reflect the second udpate.
 class InstX8632Xadd : public InstX8632Lockable {
+  InstX8632Xadd() = delete;
   InstX8632Xadd(const InstX8632Xadd &) = delete;
   InstX8632Xadd &operator=(const InstX8632Xadd &) = delete;
 
@@ -1547,6 +1591,7 @@
 // then the instruction is automatically "locked" without the need for
 // a lock prefix.
 class InstX8632Xchg : public InstX8632 {
+  InstX8632Xchg() = delete;
   InstX8632Xchg(const InstX8632Xchg &) = delete;
   InstX8632Xchg &operator=(const InstX8632Xchg &) = delete;
 
diff --git a/src/IceLiveness.h b/src/IceLiveness.h
index c287dc2..6af0ef0 100644
--- a/src/IceLiveness.h
+++ b/src/IceLiveness.h
@@ -26,6 +26,7 @@
 namespace Ice {
 
 class Liveness {
+  Liveness() = delete;
   Liveness(const Liveness &) = delete;
   Liveness &operator=(const Liveness &) = delete;
 
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 1f2609f..5630c5c 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -26,6 +26,7 @@
 namespace Ice {
 
 class Operand {
+  Operand() = delete;
   Operand(const Operand &) = delete;
   Operand &operator=(const Operand &) = delete;
 
@@ -97,6 +98,7 @@
 // Constant is the abstract base class for constants.  All
 // constants are allocated from a global arena and are pooled.
 class Constant : public Operand {
+  Constant() = delete;
   Constant(const Constant &) = delete;
   Constant &operator=(const Constant &) = delete;
 
@@ -128,6 +130,7 @@
 // ConstantPrimitive<> wraps a primitive type.
 template <typename T, Operand::OperandKind K>
 class ConstantPrimitive : public Constant {
+  ConstantPrimitive() = delete;
   ConstantPrimitive(const ConstantPrimitive &) = delete;
   ConstantPrimitive &operator=(const ConstantPrimitive &) = delete;
 
@@ -191,6 +194,7 @@
 // ConstantRelocatable can fit into the global constant pool
 // template mechanism.
 class RelocatableTuple {
+  RelocatableTuple() = delete;
   RelocatableTuple &operator=(const RelocatableTuple &) = delete;
 
 public:
@@ -209,6 +213,7 @@
 // ConstantRelocatable represents a symbolic constant combined with
 // a fixed offset.
 class ConstantRelocatable : public Constant {
+  ConstantRelocatable() = delete;
   ConstantRelocatable(const ConstantRelocatable &) = delete;
   ConstantRelocatable &operator=(const ConstantRelocatable &) = delete;
 
@@ -252,6 +257,7 @@
 // legal to lower ConstantUndef to any value, backends should try to
 // make code generation deterministic by lowering ConstantUndefs to 0.
 class ConstantUndef : public Constant {
+  ConstantUndef() = delete;
   ConstantUndef(const ConstantUndef &) = delete;
   ConstantUndef &operator=(const ConstantUndef &) = delete;
 
@@ -286,10 +292,9 @@
 // special value that represents infinite weight, and an addWeight()
 // method that ensures that W+infinity=infinity.
 class RegWeight {
-
 public:
   RegWeight() : Weight(0) {}
-  RegWeight(uint32_t Weight) : Weight(Weight) {}
+  explicit RegWeight(uint32_t Weight) : Weight(Weight) {}
   RegWeight(const RegWeight &) = default;
   RegWeight &operator=(const RegWeight &) = default;
   const static uint32_t Inf = ~0; // Force regalloc to give a register
@@ -304,6 +309,7 @@
   void setWeight(uint32_t Val) { Weight = Val; }
   uint32_t getWeight() const { return Weight; }
   bool isInf() const { return Weight == Inf; }
+  bool isZero() const { return Weight == Zero; }
 
 private:
   uint32_t Weight;
@@ -324,7 +330,7 @@
   LiveRange() : Weight(0) {}
   // Special constructor for building a kill set.  The advantage is
   // that we can reserve the right amount of space in advance.
-  LiveRange(const std::vector<InstNumberT> &Kills) : Weight(0) {
+  explicit LiveRange(const std::vector<InstNumberT> &Kills) : Weight(0) {
     Range.reserve(Kills.size());
     for (InstNumberT I : Kills)
       addSegment(I, I);
@@ -380,6 +386,7 @@
 // stack-allocated.  If it is register-allocated, it will ultimately
 // have a non-negative RegNum field.
 class Variable : public Operand {
+  Variable() = delete;
   Variable(const Variable &) = delete;
   Variable &operator=(const Variable &) = delete;
 
@@ -421,8 +428,8 @@
   void setRegNumTmp(int32_t NewRegNum) { RegNumTmp = NewRegNum; }
 
   RegWeight getWeight() const { return Weight; }
-  void setWeight(uint32_t NewWeight) { Weight = NewWeight; }
-  void setWeightInfinite() { Weight = RegWeight::Inf; }
+  void setWeight(uint32_t NewWeight) { Weight = RegWeight(NewWeight); }
+  void setWeightInfinite() { setWeight(RegWeight::Inf); }
 
   LiveRange &getLiveRange() { return Live; }
   const LiveRange &getLiveRange() const { return Live; }
@@ -432,11 +439,13 @@
     assert(WeightDelta != RegWeight::Inf);
     Live.addSegment(Start, End);
     if (Weight.isInf())
-      Live.setWeight(RegWeight::Inf);
+      Live.setWeight(RegWeight(RegWeight::Inf));
     else
       Live.addWeight(WeightDelta * Weight.getWeight());
   }
-  void setLiveRangeInfiniteWeight() { Live.setWeight(RegWeight::Inf); }
+  void setLiveRangeInfiniteWeight() {
+    Live.setWeight(RegWeight(RegWeight::Inf));
+  }
   void trimLiveRange(InstNumberT Start) { Live.trim(Start); }
   void untrimLiveRange() { Live.untrim(); }
   bool rangeEndsBefore(const Variable *Other) const {
@@ -570,11 +579,12 @@
 // VariablesMetadata analyzes and summarizes the metadata for the
 // complete set of Variables.
 class VariablesMetadata {
+  VariablesMetadata() = delete;
   VariablesMetadata(const VariablesMetadata &) = delete;
   VariablesMetadata &operator=(const VariablesMetadata &) = delete;
 
 public:
-  VariablesMetadata(const Cfg *Func) : Func(Func) {}
+  explicit VariablesMetadata(const Cfg *Func) : Func(Func) {}
   // Initialize the state by traversing all instructions/variables in
   // the CFG.
   void init(MetadataKind TrackingKind);
diff --git a/src/IceRNG.h b/src/IceRNG.h
index bb2ac45..174e3e0 100644
--- a/src/IceRNG.h
+++ b/src/IceRNG.h
@@ -22,11 +22,12 @@
 namespace Ice {
 
 class RandomNumberGenerator {
+  RandomNumberGenerator() = delete;
   RandomNumberGenerator(const RandomNumberGenerator &) = delete;
   RandomNumberGenerator &operator=(const RandomNumberGenerator &) = delete;
 
 public:
-  RandomNumberGenerator(llvm::StringRef Salt);
+  explicit RandomNumberGenerator(llvm::StringRef Salt);
   uint64_t next(uint64_t Max);
 
 private:
@@ -37,6 +38,7 @@
 // reason for the wrapper class is that we want to keep the
 // RandomNumberGenerator interface identical to LLVM's.
 class RandomNumberGeneratorWrapper {
+  RandomNumberGeneratorWrapper() = delete;
   RandomNumberGeneratorWrapper(const RandomNumberGeneratorWrapper &) = delete;
   RandomNumberGeneratorWrapper &
   operator=(const RandomNumberGeneratorWrapper &) = delete;
@@ -44,7 +46,8 @@
 public:
   uint64_t operator()(uint64_t Max) { return RNG.next(Max); }
   bool getTrueWithProbability(float Probability);
-  RandomNumberGeneratorWrapper(RandomNumberGenerator &RNG) : RNG(RNG) {}
+  explicit RandomNumberGeneratorWrapper(RandomNumberGenerator &RNG)
+      : RNG(RNG) {}
 
 private:
   RandomNumberGenerator &RNG;
diff --git a/src/IceRegAlloc.cpp b/src/IceRegAlloc.cpp
index d171005..7926123 100644
--- a/src/IceRegAlloc.cpp
+++ b/src/IceRegAlloc.cpp
@@ -95,7 +95,7 @@
   for (Variable *Var : Vars) {
     // Explicitly don't consider zero-weight variables, which are
     // meant to be spill slots.
-    if (Var->getWeight() == RegWeight::Zero)
+    if (Var->getWeight().isZero())
       continue;
     // Don't bother if the variable has a null live range, which means
     // it was never referenced.
@@ -167,7 +167,7 @@
       if (Inst.isDeleted())
         continue;
       if (const Variable *Var = Inst.getDest()) {
-        if (Var->hasReg() || Var->getWeight() == RegWeight::Inf) {
+        if (Var->hasReg() || Var->getWeight().isInf()) {
           if (LRBegin[Var->getIndex()] == Inst::NumberSentinel) {
             LRBegin[Var->getIndex()] = Inst.getNumber();
             ++NumVars;
@@ -179,7 +179,7 @@
         SizeT NumVars = Src->getNumVars();
         for (SizeT J = 0; J < NumVars; ++J) {
           const Variable *Var = Src->getVar(J);
-          if (Var->hasReg() || Var->getWeight() == RegWeight::Inf)
+          if (Var->hasReg() || Var->getWeight().isInf())
             LREnd[Var->getIndex()] = Inst.getNumber();
         }
       }
diff --git a/src/IceRegAlloc.h b/src/IceRegAlloc.h
index c5c1c9e..b53a6c9 100644
--- a/src/IceRegAlloc.h
+++ b/src/IceRegAlloc.h
@@ -22,11 +22,12 @@
 namespace Ice {
 
 class LinearScan {
+  LinearScan() = delete;
   LinearScan(const LinearScan &) = delete;
   LinearScan &operator=(const LinearScan &) = delete;
 
 public:
-  LinearScan(Cfg *Func)
+  explicit LinearScan(Cfg *Func)
       : Func(Func), FindPreference(false), FindOverlap(false) {}
   void init(RegAllocKind Kind);
   void scan(const llvm::SmallBitVector &RegMask, bool Randomized);
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 2ad2685..350b5c7 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -90,6 +90,7 @@
 };
 
 class TargetLowering {
+  TargetLowering() = delete;
   TargetLowering(const TargetLowering &) = delete;
   TargetLowering &operator=(const TargetLowering &) = delete;
 
@@ -214,7 +215,7 @@
   virtual ~TargetLowering() {}
 
 protected:
-  TargetLowering(Cfg *Func);
+  explicit TargetLowering(Cfg *Func);
   virtual void lowerAlloca(const InstAlloca *Inst) = 0;
   virtual void lowerArithmetic(const InstArithmetic *Inst) = 0;
   virtual void lowerAssign(const InstAssign *Inst) = 0;
@@ -272,7 +273,7 @@
   virtual void lowerConstants() const = 0;
 
 protected:
-  TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
+  explicit TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
   GlobalContext *Ctx;
 };
 
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 32102df..4237e16 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -748,7 +748,7 @@
     // A spill slot linked to a variable with a stack slot should reuse
     // that stack slot.
     if (SpillVariable *SpillVar = llvm::dyn_cast<SpillVariable>(Var)) {
-      assert(Var->getWeight() == RegWeight::Zero);
+      assert(Var->getWeight().isZero());
       if (!SpillVar->getLinkedTo()->hasReg()) {
         VariablesLinkedToSpillSlots.push_back(Var);
         continue;
@@ -4336,7 +4336,7 @@
                                                            Variable *Slot,
                                                            uint32_t Offset) {
   // Ensure that Loc is a stack slot.
-  assert(Slot->getWeight() == RegWeight::Zero);
+  assert(Slot->getWeight().isZero());
   assert(Slot->getRegNum() == Variable::NoRegister);
   // Compute the location of Loc in memory.
   // TODO(wala,stichnot): lea should not be required.  The address of
@@ -4433,8 +4433,7 @@
     // Check if the variable is guaranteed a physical register.  This
     // can happen either when the variable is pre-colored or when it is
     // assigned infinite weight.
-    bool MustHaveRegister =
-        (Var->hasReg() || Var->getWeight() == RegWeight::Inf);
+    bool MustHaveRegister = (Var->hasReg() || Var->getWeight().isInf());
     // We need a new physical register for the operand if:
     //   Mem is not allowed and Var isn't guaranteed a physical
     //   register, or
diff --git a/src/IceTargetLoweringX8632.h b/src/IceTargetLoweringX8632.h
index b376ec3..4f87006 100644
--- a/src/IceTargetLoweringX8632.h
+++ b/src/IceTargetLoweringX8632.h
@@ -25,6 +25,7 @@
 namespace Ice {
 
 class TargetX8632 : public TargetLowering {
+  TargetX8632() = delete;
   TargetX8632(const TargetX8632 &) = delete;
   TargetX8632 &operator=(const TargetX8632 &) = delete;
 
@@ -78,7 +79,7 @@
   X86InstructionSet getInstructionSet() const { return InstructionSet; }
 
 protected:
-  TargetX8632(Cfg *Func);
+  explicit TargetX8632(Cfg *Func);
 
   void postLower() override;
 
@@ -509,7 +510,7 @@
   void lowerConstants() const final;
 
 protected:
-  TargetDataX8632(GlobalContext *Ctx);
+  explicit TargetDataX8632(GlobalContext *Ctx);
 
 private:
   void lowerGlobal(const VariableDeclaration &Var) const;
diff --git a/src/IceTimerTree.h b/src/IceTimerTree.h
index e40a917..c7cfd6e 100644
--- a/src/IceTimerTree.h
+++ b/src/IceTimerTree.h
@@ -20,6 +20,7 @@
 namespace Ice {
 
 class TimerStack {
+  TimerStack() = delete;
   TimerStack &operator=(const TimerStack &) = delete;
 
   // Timer tree index type.  A variable of this type is used to access
@@ -59,7 +60,7 @@
 #undef X
         TT__num
   };
-  TimerStack(const IceString &Name);
+  explicit TimerStack(const IceString &Name);
   TimerStack(const TimerStack &) = default;
   TimerIdT getTimerID(const IceString &Name);
   void mergeFrom(const TimerStack &Src);
diff --git a/src/IceTranslator.h b/src/IceTranslator.h
index bc9a933..d039148 100644
--- a/src/IceTranslator.h
+++ b/src/IceTranslator.h
@@ -30,11 +30,12 @@
 // other intermediate representations down to ICE, and then call the appropriate
 // (inherited) methods to convert ICE into machine instructions.
 class Translator {
+  Translator() = delete;
   Translator(const Translator &) = delete;
   Translator &operator=(const Translator &) = delete;
 
 public:
-  Translator(GlobalContext *Ctx);
+  explicit Translator(GlobalContext *Ctx);
 
   ~Translator();
   const ErrorCode &getErrorStatus() const { return ErrorStatus; }
diff --git a/src/IceTypeConverter.h b/src/IceTypeConverter.h
index 0450aac..74e9671 100644
--- a/src/IceTypeConverter.h
+++ b/src/IceTypeConverter.h
@@ -28,12 +28,13 @@
 
 /// Converts LLVM types to ICE types, and ICE types to LLVM types.
 class TypeConverter {
+  TypeConverter() = delete;
   TypeConverter(const TypeConverter &) = delete;
   TypeConverter &operator=(const TypeConverter &) = delete;
 
 public:
   /// Context is the context to use to build llvm types.
-  TypeConverter(llvm::LLVMContext &Context);
+  explicit TypeConverter(llvm::LLVMContext &Context);
 
   /// Converts LLVM type LLVMTy to an ICE type. Returns
   /// Ice::IceType_NUM if unable to convert.
diff --git a/src/IceUtils.h b/src/IceUtils.h
index 7b1ab81..1a7a8df 100644
--- a/src/IceUtils.h
+++ b/src/IceUtils.h
@@ -31,6 +31,10 @@
 }
 
 class Utils {
+  Utils() = delete;
+  Utils(const Utils &) = delete;
+  Utils &operator=(const Utils &) = delete;
+
 public:
   // Check whether an N-bit two's-complement representation can hold value.
   template <typename T> static inline bool IsInt(int N, T value) {
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index a0ce417..b88b0ae 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -105,6 +105,7 @@
 
 // Models an ICE type as an extended type.
 class SimpleExtendedType : public ExtendedType {
+  SimpleExtendedType() = delete;
   SimpleExtendedType(const SimpleExtendedType &) = delete;
   SimpleExtendedType &operator=(const SimpleExtendedType &) = delete;
 
@@ -118,6 +119,7 @@
 
 // Models a function signature as an extended type.
 class FuncSigExtendedType : public ExtendedType {
+  FuncSigExtendedType() = delete;
   FuncSigExtendedType(const FuncSigExtendedType &) = delete;
   FuncSigExtendedType &operator=(const FuncSigExtendedType &) = delete;
 
@@ -153,6 +155,7 @@
 
 // Top-level class to read PNaCl bitcode files, and translate to ICE.
 class TopLevelParser : public NaClBitcodeParser {
+  TopLevelParser() = delete;
   TopLevelParser(const TopLevelParser &) = delete;
   TopLevelParser &operator=(const TopLevelParser &) = delete;
 
@@ -568,6 +571,7 @@
 // messages if ParseBlock or ParseRecord is not overridden in derived
 // classes.
 class BlockParserBaseClass : public NaClBitcodeParser {
+  BlockParserBaseClass() = delete;
   BlockParserBaseClass(const BlockParserBaseClass &) = delete;
   BlockParserBaseClass &operator=(const BlockParserBaseClass &) = delete;
 
@@ -736,6 +740,10 @@
 
 // Class to parse a types block.
 class TypesParser : public BlockParserBaseClass {
+  TypesParser() = delete;
+  TypesParser(const TypesParser &) = delete;
+  TypesParser &operator=(const TypesParser &) = delete;
+
 public:
   TypesParser(unsigned BlockID, BlockParserBaseClass *EnclosingParser)
       : BlockParserBaseClass(BlockID, EnclosingParser),
@@ -911,6 +919,10 @@
 /// Parses the globals block (i.e. global variable declarations and
 /// corresponding initializers).
 class GlobalsParser : public BlockParserBaseClass {
+  GlobalsParser() = delete;
+  GlobalsParser(const GlobalsParser &) = delete;
+  GlobalsParser &operator=(const GlobalsParser &) = delete;
+
 public:
   GlobalsParser(unsigned BlockID, BlockParserBaseClass *EnclosingParser)
       : BlockParserBaseClass(BlockID, EnclosingParser),
@@ -1064,6 +1076,7 @@
 
 /// Base class for parsing a valuesymtab block in the bitcode file.
 class ValuesymtabParser : public BlockParserBaseClass {
+  ValuesymtabParser() = delete;
   ValuesymtabParser(const ValuesymtabParser &) = delete;
   void operator=(const ValuesymtabParser &) = delete;
 
@@ -1125,6 +1138,7 @@
 
 /// Parses function blocks in the bitcode file.
 class FunctionParser : public BlockParserBaseClass {
+  FunctionParser() = delete;
   FunctionParser(const FunctionParser &) = delete;
   FunctionParser &operator=(const FunctionParser &) = delete;
 
@@ -2626,6 +2640,7 @@
 
 /// Parses constants within a function block.
 class ConstantsParser : public BlockParserBaseClass {
+  ConstantsParser() = delete;
   ConstantsParser(const ConstantsParser &) = delete;
   ConstantsParser &operator=(const ConstantsParser &) = delete;
 
@@ -2754,6 +2769,7 @@
 
 // Parses valuesymtab blocks appearing in a function block.
 class FunctionValuesymtabParser : public ValuesymtabParser {
+  FunctionValuesymtabParser() = delete;
   FunctionValuesymtabParser(const FunctionValuesymtabParser &) = delete;
   void operator=(const FunctionValuesymtabParser &) = delete;
 
@@ -2839,6 +2855,10 @@
 
 /// Parses the module block in the bitcode file.
 class ModuleParser : public BlockParserBaseClass {
+  ModuleParser() = delete;
+  ModuleParser(const ModuleParser &) = delete;
+  ModuleParser &operator=(const ModuleParser &) = delete;
+
 public:
   ModuleParser(unsigned BlockID, TopLevelParser *Context)
       : BlockParserBaseClass(BlockID, Context),
@@ -2876,6 +2896,7 @@
 };
 
 class ModuleValuesymtabParser : public ValuesymtabParser {
+  ModuleValuesymtabParser() = delete;
   ModuleValuesymtabParser(const ModuleValuesymtabParser &) = delete;
   void operator=(const ModuleValuesymtabParser &) = delete;
 
diff --git a/src/PNaClTranslator.h b/src/PNaClTranslator.h
index 1bd4d5b..9162d59 100644
--- a/src/PNaClTranslator.h
+++ b/src/PNaClTranslator.h
@@ -26,11 +26,12 @@
 namespace Ice {
 
 class PNaClTranslator : public Translator {
+  PNaClTranslator() = delete;
   PNaClTranslator(const PNaClTranslator &) = delete;
   PNaClTranslator &operator=(const PNaClTranslator &) = delete;
 
 public:
-  PNaClTranslator(GlobalContext *Ctx) : Translator(Ctx) {}
+  explicit PNaClTranslator(GlobalContext *Ctx) : Translator(Ctx) {}
 
   // Reads the PNaCl bitcode file and translates to ICE, which is then
   // converted to machine code. Sets ErrorStatus to 1 if any errors