Make helper functions static. NFC.

llvm-svn: 304028
This commit is contained in:
Benjamin Kramer 2017-05-26 20:08:24 +00:00
parent 8c3735e597
commit 674d579271
4 changed files with 13 additions and 13 deletions

View File

@ -448,8 +448,8 @@ const Attr *Decl::getDefiningAttr() const {
return nullptr;
}
StringRef getRealizedPlatform(const AvailabilityAttr *A,
const ASTContext &Context) {
static StringRef getRealizedPlatform(const AvailabilityAttr *A,
const ASTContext &Context) {
// Check if this is an App Extension "platform", and if so chop off
// the suffix for matching with the actual platform.
StringRef RealizedPlatform = A->getPlatform()->getName();

View File

@ -1243,10 +1243,10 @@ static void emitReductionListCopy(
/// local = local @ remote
/// else
/// local = remote
llvm::Value *emitReduceScratchpadFunction(CodeGenModule &CGM,
ArrayRef<const Expr *> Privates,
QualType ReductionArrayTy,
llvm::Value *ReduceFn) {
static llvm::Value *
emitReduceScratchpadFunction(CodeGenModule &CGM,
ArrayRef<const Expr *> Privates,
QualType ReductionArrayTy, llvm::Value *ReduceFn) {
auto &C = CGM.getContext();
auto Int32Ty = C.getIntTypeForBitwidth(32, /* Signed */ true);
@ -1372,9 +1372,9 @@ llvm::Value *emitReduceScratchpadFunction(CodeGenModule &CGM,
/// for elem in Reduce List:
/// scratchpad[elem_id][index] = elem
///
llvm::Value *emitCopyToScratchpad(CodeGenModule &CGM,
ArrayRef<const Expr *> Privates,
QualType ReductionArrayTy) {
static llvm::Value *emitCopyToScratchpad(CodeGenModule &CGM,
ArrayRef<const Expr *> Privates,
QualType ReductionArrayTy) {
auto &C = CGM.getContext();
auto Int32Ty = C.getIntTypeForBitwidth(32, /* Signed */ true);

View File

@ -945,9 +945,9 @@ findLinesForRange(const CharSourceRange &R, FileID FID,
/// Add as much of range B into range A as possible without exceeding a maximum
/// size of MaxRange. Ranges are inclusive.
std::pair<unsigned, unsigned> maybeAddRange(std::pair<unsigned, unsigned> A,
std::pair<unsigned, unsigned> B,
unsigned MaxRange) {
static std::pair<unsigned, unsigned>
maybeAddRange(std::pair<unsigned, unsigned> A, std::pair<unsigned, unsigned> B,
unsigned MaxRange) {
// If A is already the maximum size, we're done.
unsigned Slack = MaxRange - (A.second - A.first + 1);
if (Slack == 0)

View File

@ -238,7 +238,7 @@ static typename std::enable_if<std::is_base_of<clang::Attr, AttrInfo>::value,
getAttrName(const AttrInfo &Attr) {
return &Attr;
}
const IdentifierInfo *getAttrName(const clang::AttributeList &Attr) {
static const IdentifierInfo *getAttrName(const clang::AttributeList &Attr) {
return Attr.getName();
}