llvm.org GIT mirror llvm / afa9824
Remove unused functions. Remove static qualifier from functions in header files. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299947 91177308-0d34-0410-b5e6-96231b3b80d8 Vassil Vassilev 3 years ago
9 changed file(s) with 9 addition(s) and 65 deletion(s). Raw diff Collapse all Expand all
189189 };
190190
191191 template
192 static bool operator==(PointerUnion lhs, PointerUnion rhs) {
192 bool operator==(PointerUnion lhs, PointerUnion rhs) {
193193 return lhs.getOpaqueValue() == rhs.getOpaqueValue();
194194 }
195195
196196 template
197 static bool operator!=(PointerUnion lhs, PointerUnion rhs) {
197 bool operator!=(PointerUnion lhs, PointerUnion rhs) {
198198 return lhs.getOpaqueValue() != rhs.getOpaqueValue();
199199 }
200200
201201 template
202 static bool operator<(PointerUnion lhs, PointerUnion rhs) {
202 bool operator<(PointerUnion lhs, PointerUnion rhs) {
203203 return lhs.getOpaqueValue() < rhs.getOpaqueValue();
204204 }
205205
576576 }
577577
578578 template
579 static void
580 addInnerLoopsToHeadersMap(DenseMap &LoopHeaders,
581 const LoopInfoBase &LI,
582 const LoopT &L) {
579 void addInnerLoopsToHeadersMap(DenseMap &LoopHeaders,
580 const LoopInfoBase &LI,
581 const LoopT &L) {
583582 LoopHeaders[L.getHeader()] = &L;
584583 for (LoopT *SL : L)
585584 addInnerLoopsToHeadersMap(LoopHeaders, LI, *SL);
288288 // the handler ran.
289289 template
290290 typename SequenceNumberT>
291 static Error respond(ChannelT &C, const FunctionIdT &ResponseId,
292 SequenceNumberT SeqNo, Error Err) {
291 Error respond(ChannelT &C, const FunctionIdT &ResponseId, SequenceNumberT SeqNo,
292 Error Err) {
293293 if (Err)
294294 return Err;
295295 if (auto Err2 = C.startSendMessage(ResponseId, SeqNo))
339339 }
340340
341341 template
342 static bool compareAddr(uint64_t VAddr, const Elf_Phdr_Impl *Phdr) {
342 bool compareAddr(uint64_t VAddr, const Elf_Phdr_Impl *Phdr) {
343343 return VAddr < Phdr->p_vaddr;
344344 }
345345
14371437 }
14381438 #endif
14391439
1440 /// \brief Test that two functions either have or have not the given attribute
1441 /// at the same time.
1442 template
1443 static bool attributeMatches(Function *F1, Function *F2, AttrKind Attr) {
1444 return F1->getFnAttribute(Attr) == F2->getFnAttribute(Attr);
1445 }
1446
14471440 /// \brief Test that there are no attribute conflicts between Caller and Callee
14481441 /// that prevent inlining.
14491442 static bool functionsHaveCompatibleAttributes(Function *Caller,
1414
1515 using namespace llvm;
1616 using namespace llvm::codeview;
17
18 template
19 static Error takeObject(ArrayRef &Data, const T *&Res) {
20 if (Data.size() < sizeof(*Res))
21 return llvm::make_error(cv_error_code::insufficient_buffer);
22 Res = reinterpret_cast(Data.data());
23 Data = Data.drop_front(sizeof(*Res));
24 return Error::success();
25 }
2617
2718 CVSymbolVisitor::CVSymbolVisitor(SymbolVisitorCallbacks &Callbacks)
2819 : Callbacks(Callbacks) {}
831831 static bool isScope(const Metadata *MD) { return !MD || isa(MD); }
832832 static bool isDINode(const Metadata *MD) { return !MD || isa(MD); }
833833
834 template
835 static bool isValidMetadataArrayImpl(const MDTuple &N, bool AllowNull) {
836 for (Metadata *MD : N.operands()) {
837 if (MD) {
838 if (!isa(MD))
839 return false;
840 } else {
841 if (!AllowNull)
842 return false;
843 }
844 }
845 return true;
846 }
847
848 template static bool isValidMetadataArray(const MDTuple &N) {
849 return isValidMetadataArrayImpl(N, /* AllowNull */ false);
850 }
851
852 template static bool isValidMetadataNullArray(const MDTuple &N) {
853 return isValidMetadataArrayImpl(N, /* AllowNull */ true);
854 }
855
856834 void Verifier::visitDILocation(const DILocation &N) {
857835 AssertDI(N.getRawScope() && isa(N.getRawScope()),
858836 "location requires a valid scope", &N, N.getRawScope());
103103 return P;
104104 // Not null terminated, so this is a 16 char string.
105105 return StringRef(P, 16);
106 }
107
108 // Helper to advance a section or symbol iterator multiple increments at a time.
109 template
110 static void advance(T &it, size_t Val) {
111 while (Val--)
112 ++it;
113106 }
114107
115108 static unsigned getCPUType(const MachOObjectFile &O) {
9797 );
9898
9999 #define INVALIDSCCNUM -1
100
101 template
102 void ReverseVector(SmallVectorImpl &Src) {
103 size_t sz = Src.size();
104 for (size_t i = 0; i < sz/2; ++i) {
105 NodeT *t = Src[i];
106 Src[i] = Src[sz - i - 1];
107 Src[sz - i - 1] = t;
108 }
109 }
110100
111101 //===----------------------------------------------------------------------===//
112102 //