本文整理汇总了C++中llvm::StringRef::equals_lower方法的典型用法代码示例。如果您正苦于以下问题:C++ StringRef::equals_lower方法的具体用法?C++ StringRef::equals_lower怎么用?C++ StringRef::equals_lower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类llvm::StringRef
的用法示例。
在下文中一共展示了StringRef::equals_lower方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
lldb::ScriptLanguage
ScriptInterpreter::StringToLanguage(const llvm::StringRef &language) {
if (language.equals_lower(LanguageToString(eScriptLanguageNone)))
return eScriptLanguageNone;
else if (language.equals_lower(LanguageToString(eScriptLanguagePython)))
return eScriptLanguagePython;
else
return eScriptLanguageUnknown;
}
示例2: return
bool
impl::ElfMatch_x86_amd64(llvm::StringRef arch_keyword,
llvm::StringRef arch_machine,
ElfClass cls)
{
return (arch_keyword.equals_lower("x86") &&
arch_machine.equals_lower("amd64") &&
(cls == ELFCLASSNONE || cls == ELFCLASS64));
}
示例3: GetLanguageTypeFromString
LanguageType Language::GetLanguageTypeFromString(llvm::StringRef string) {
for (const auto &L : language_names) {
if (string.equals_lower(L.name))
return static_cast<LanguageType>(L.type);
}
return eLanguageTypeUnknown;
}
示例4: if
void
BinObject::AddDirectives(Directives& dirs, llvm::StringRef parser)
{
static const Directives::Init<BinObject> nasm_dirs[] =
{
{"section", &BinObject::DirSection, Directives::ARG_REQUIRED},
{"segment", &BinObject::DirSection, Directives::ARG_REQUIRED},
{"org", &BinObject::DirOrg, Directives::ARG_REQUIRED},
{"map", &BinObject::DirMap, Directives::ANY},
};
static const Directives::Init<BinObject> gas_dirs[] =
{
{".section", &BinObject::DirSection, Directives::ARG_REQUIRED},
};
if (parser.equals_lower("nasm"))
dirs.AddArray(this, nasm_dirs);
else if (parser.equals_lower("gas") || parser.equals_lower("gnu"))
dirs.AddArray(this, gas_dirs);
}
示例5:
void
XdfObject::AddDirectives(Directives& dirs, llvm::StringRef parser)
{
static const Directives::Init<XdfObject> nasm_dirs[] =
{
{"section", &XdfObject::DirSection, Directives::ARG_REQUIRED},
{"segment", &XdfObject::DirSection, Directives::ARG_REQUIRED},
};
if (parser.equals_lower("nasm"))
dirs.AddArray(this, nasm_dirs);
}
示例6: if
void
Win64Object::AddDirectives(Directives& dirs, llvm::StringRef parser)
{
static const Directives::Init<Win64Object> gas_dirs[] =
{
{".export", &Win64Object::DirExport, Directives::ID_REQUIRED},
{".proc_frame", &Win64Object::DirProcFrame, Directives::ID_REQUIRED},
{".pushreg", &Win64Object::DirPushReg, Directives::ARG_REQUIRED},
{".setframe", &Win64Object::DirSetFrame, Directives::ARG_REQUIRED},
{".allocstack", &Win64Object::DirAllocStack, Directives::ARG_REQUIRED},
{".savereg", &Win64Object::DirSaveReg, Directives::ARG_REQUIRED},
{".savexmm128", &Win64Object::DirSaveXMM128, Directives::ARG_REQUIRED},
{".pushframe", &Win64Object::DirPushFrame, Directives::ANY},
{".endprolog", &Win64Object::DirEndProlog, Directives::ANY},
{".endproc_frame", &Win64Object::DirEndProcFrame, Directives::ANY},
};
static const Directives::Init<Win64Object> nasm_dirs[] =
{
{"export", &Win64Object::DirExport, Directives::ID_REQUIRED},
{"proc_frame", &Win64Object::DirProcFrame, Directives::ID_REQUIRED},
{"pushreg", &Win64Object::DirPushReg, Directives::ARG_REQUIRED},
{"setframe", &Win64Object::DirSetFrame, Directives::ARG_REQUIRED},
{"allocstack", &Win64Object::DirAllocStack, Directives::ARG_REQUIRED},
{"savereg", &Win64Object::DirSaveReg, Directives::ARG_REQUIRED},
{"savexmm128", &Win64Object::DirSaveXMM128, Directives::ARG_REQUIRED},
{"pushframe", &Win64Object::DirPushFrame, Directives::ANY},
{"endprolog", &Win64Object::DirEndProlog, Directives::ANY},
{"endproc_frame", &Win64Object::DirEndProcFrame, Directives::ANY},
};
if (parser.equals_lower("nasm"))
dirs.AddArray(this, nasm_dirs);
else if (parser.equals_lower("gas") || parser.equals_lower("gnu"))
dirs.AddArray(this, gas_dirs);
// Pull in coff directives (but not win32 directives)
CoffObject::AddDirectives(dirs, parser);
}
示例7: IsMainFile
static bool IsMainFile(llvm::StringRef main, llvm::StringRef other) {
if (main == other)
return true;
// If the files refer to the local file system, we can just ask the file
// system if they're equivalent. But if the source isn't present on disk
// then we still want to try.
if (llvm::sys::fs::equivalent(main, other))
return true;
llvm::SmallString<64> normalized(other);
llvm::sys::path::native(normalized);
return main.equals_lower(normalized);
}