Adds accessor methods to class ClFlags.

Allows one to define explicit overrides in get accessors, based on
compilation features. To show usage, modified SubConstantCalls to
never be enabled if building a minimal llvm2ice.

BUG=None
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/905463003
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index 8e57ba6..9fd0106 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -313,7 +313,7 @@
 void TargetX8632::translateO2() {
   TimerMarker T(TimerStack::TT_O2, Func);
 
-  if (!Ctx->getFlags().PhiEdgeSplit) {
+  if (!Ctx->getFlags().getPhiEdgeSplit()) {
     // Lower Phi instructions.
     Func->placePhiLoads();
     if (Func->hasError())
@@ -377,7 +377,7 @@
     return;
   Func->dump("After linear scan regalloc");
 
-  if (Ctx->getFlags().PhiEdgeSplit) {
+  if (Ctx->getFlags().getPhiEdgeSplit()) {
     Func->advancedPhiLowering();
     Func->dump("After advanced Phi lowering");
   }
@@ -3067,7 +3067,7 @@
     return;
   }
   case Intrinsics::NaClReadTP: {
-    if (Ctx->getFlags().UseSandboxing) {
+    if (Ctx->getFlags().getUseSandboxing()) {
       Constant *Zero = Ctx->getConstantZero(IceType_i32);
       Operand *Src =
           OperandX8632Mem::create(Func, IceType_i32, nullptr, Zero, nullptr, 0,
@@ -4566,7 +4566,7 @@
 void TargetDataX8632::lowerGlobal(const VariableDeclaration &Var) const {
   // If external and not initialized, this must be a cross test.
   // Don't generate a declaration for such cases.
-  bool IsExternal = Var.isExternal() || Ctx->getFlags().DisableInternal;
+  bool IsExternal = Var.isExternal() || Ctx->getFlags().getDisableInternal();
   if (IsExternal && !Var.hasInitializer())
     return;
 
@@ -4579,7 +4579,7 @@
   SizeT Size = Var.getNumBytes();
   IceString MangledName = Var.mangleName(Ctx);
   IceString SectionSuffix = "";
-  if (Ctx->getFlags().DataSections)
+  if (Ctx->getFlags().getDataSections())
     SectionSuffix = "." + MangledName;
 
   Str << "\t.type\t" << MangledName << ",@object\n";
@@ -4702,11 +4702,11 @@
 }
 
 void TargetDataX8632::lowerConstants(GlobalContext *Ctx) const {
-  if (Ctx->getFlags().DisableTranslation)
+  if (Ctx->getFlags().getDisableTranslation())
     return;
   // No need to emit constants from the int pool since (for x86) they
   // are embedded as immediates in the instructions, just emit float/double.
-  if (Ctx->getFlags().UseELFWriter) {
+  if (Ctx->getFlags().getUseELFWriter()) {
     ELFObjectWriter *Writer = Ctx->getObjectWriter();
     Writer->writeConstantPool<ConstantFloat>(IceType_f32);
     Writer->writeConstantPool<ConstantDouble>(IceType_f64);