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/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp
index bd0d089..6fbf1df 100644
--- a/src/IceELFObjectWriter.cpp
+++ b/src/IceELFObjectWriter.cpp
@@ -296,7 +296,8 @@
VariableDeclarationList VarsBySection[ELFObjectWriter::NumSectionTypes];
for (auto &SectionList : VarsBySection)
SectionList.reserve(Vars.size());
- partitionGlobalsBySection(Vars, VarsBySection, Ctx.getFlags().TranslateOnly);
+ partitionGlobalsBySection(Vars, VarsBySection,
+ Ctx.getFlags().getTranslateOnly());
bool IsELF64 = isELF64(Ctx.getTargetArch());
size_t I = 0;
for (auto &SectionList : VarsBySection) {
@@ -371,7 +372,7 @@
Elf64_Xword Align = Var->getAlignment();
Section->padToAlignment(Str, Align);
SizeT SymbolSize = Var->getNumBytes();
- bool IsExternal = Var->isExternal() || Ctx.getFlags().DisableInternal;
+ bool IsExternal = Var->isExternal() || Ctx.getFlags().getDisableInternal();
const uint8_t SymbolBinding = IsExternal ? STB_GLOBAL : STB_LOCAL;
IceString MangledName = Var->mangleName(&Ctx);
SymTab->createDefinedSym(MangledName, SymbolType, SymbolBinding, Section,