{"BasicRegex", llvm::Regex::RegexFlags::BasicRegex},
};
-llvm::Optional<llvm::Regex::RegexFlags> getRegexFlag(llvm::StringRef Flag) {
+static llvm::Optional<llvm::Regex::RegexFlags>
+getRegexFlag(llvm::StringRef Flag) {
for (const auto &StringFlag : RegexMap) {
if (Flag == StringFlag.first)
return StringFlag.second;
return llvm::None;
}
-llvm::Optional<llvm::StringRef> getCloseRegexMatch(llvm::StringRef Flag) {
+static llvm::Optional<llvm::StringRef>
+getCloseRegexMatch(llvm::StringRef Flag) {
for (const auto &StringFlag : RegexMap) {
if (Flag.edit_distance(StringFlag.first) < 3)
return StringFlag.first;
}
// Get features except standard extension feature
-void getRISCFeaturesFromMcpu(const Driver &D, const llvm::Triple &Triple,
- const llvm::opt::ArgList &Args,
- const llvm::opt::Arg *A, StringRef Mcpu,
- std::vector<StringRef> &Features) {
+static void getRISCFeaturesFromMcpu(const Driver &D, const llvm::Triple &Triple,
+ const llvm::opt::ArgList &Args,
+ const llvm::opt::Arg *A, StringRef Mcpu,
+ std::vector<StringRef> &Features) {
bool Is64Bit = (Triple.getArch() == llvm::Triple::riscv64);
llvm::RISCV::CPUKind CPUKind = llvm::RISCV::parseCPUKind(Mcpu);
if (!llvm::RISCV::checkCPUKind(CPUKind, Is64Bit) ||
BTy->getKind() == BuiltinType::BFloat16;
}
-bool verifyValidIntegerConstantExpr(Sema &S, const ParsedAttr &Attr,
- llvm::APSInt &Result) {
+static bool verifyValidIntegerConstantExpr(Sema &S, const ParsedAttr &Attr,
+ llvm::APSInt &Result) {
const auto *AttrExpr = Attr.getArgAsExpr(0);
if (AttrExpr->isTypeDependent() || AttrExpr->isValueDependent() ||
!AttrExpr->isIntegerConstantExpr(Result, S.Context)) {
return nullptr;
}
-Expected<const CVIndexMap *> findPrecompMap(ObjFile *file, PrecompRecord &pr) {
+static Expected<const CVIndexMap *> findPrecompMap(ObjFile *file,
+ PrecompRecord &pr) {
// Cross-compile warning: given that Clang doesn't generate LF_PRECOMP
// records, we assume the OBJ comes from a Windows build of cl.exe. Thusly,
// the paths embedded in the OBJs are in the Windows format.
// entry (the one nearest to the front of the list.)
//
// The file can also have line comments that start with '#'.
-void parseOrderFile(StringRef path) {
+static void parseOrderFile(StringRef path) {
Optional<MemoryBufferRef> buffer = readFile(path);
if (!buffer) {
error("Could not read order file at " + path);
} // namespace
-llvm::Optional<llvm::InlineCost>
-getDefaultInlineAdvice(CallBase &CB, FunctionAnalysisManager &FAM,
- const InlineParams &Params) {
+llvm::Optional<llvm::InlineCost> static getDefaultInlineAdvice(
+ CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params) {
Function &Caller = *CB.getCaller();
ProfileSummaryInfo *PSI =
FAM.getResult<ModuleAnalysisManagerFunctionProxy>(Caller)
using namespace llvm::jitlink;
using namespace llvm::jitlink::ELF_x86_64_Edges;
+namespace {
class ELF_x86_64_GOTAndStubsBuilder
: public BasicGOTAndStubsBuilder<ELF_x86_64_GOTAndStubsBuilder> {
public:
Section *GOTSection = nullptr;
Section *StubsSection = nullptr;
};
+} // namespace
const uint8_t ELF_x86_64_GOTAndStubsBuilder::NullGOTEntryContent[8] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
return true;
}
+namespace {
class ExpandedValuesCleaner {
SCEVExpander &Expander;
TargetLibraryInfo *TLI;
}
}
};
+} // namespace
/// If the stored value is a strided load in the same loop with the same stride
/// this may be transformable into a memcpy. This kicks in for stuff like