@@ -71,13 +71,13 @@ enum class coveragemap_error {
7171 invalid_or_missing_arch_specifier
7272};
7373
74- const std::error_category &coveragemap_category ();
74+ LLVM_ABI const std::error_category &coveragemap_category ();
7575
7676inline std::error_code make_error_code (coveragemap_error E) {
7777 return std::error_code (static_cast <int >(E), coveragemap_category ());
7878}
7979
80- class CoverageMapError : public ErrorInfo <CoverageMapError> {
80+ class LLVM_ABI CoverageMapError : public ErrorInfo<CoverageMapError> {
8181public:
8282 CoverageMapError (coveragemap_error Err, const Twine &ErrStr = Twine())
8383 : Err(Err), Msg(ErrStr.str()) {
@@ -210,19 +210,19 @@ class CounterExpressionBuilder {
210210 ArrayRef<CounterExpression> getExpressions () const { return Expressions; }
211211
212212 // / Return a counter that represents the expression that adds LHS and RHS.
213- Counter add (Counter LHS, Counter RHS, bool Simplify = true );
213+ LLVM_ABI Counter add (Counter LHS, Counter RHS, bool Simplify = true );
214214
215215 // / Return a counter that represents the expression that subtracts RHS from
216216 // / LHS.
217- Counter subtract (Counter LHS, Counter RHS, bool Simplify = true );
217+ LLVM_ABI Counter subtract (Counter LHS, Counter RHS, bool Simplify = true );
218218
219219 // / K to V map. K will be Counter in most cases. V may be Counter or
220220 // / Expression.
221221 using SubstMap = std::map<Counter, Counter>;
222222
223223 // / \return A counter equivalent to \C, with each term in its
224224 // / expression replaced with term from \p Map.
225- Counter subst (Counter C, const SubstMap &Map);
225+ LLVM_ABI Counter subst (Counter C, const SubstMap &Map);
226226};
227227
228228using LineColPair = std::pair<unsigned , unsigned >;
@@ -473,7 +473,7 @@ struct MCDCRecord {
473473
474474 // Compare executed test vectors against each other to find an independence
475475 // pairs for each condition. This processing takes the most time.
476- void findIndependencePairs ();
476+ LLVM_ABI void findIndependencePairs ();
477477
478478 const CounterMappingRegion &getDecisionRegion () const { return Region; }
479479 unsigned getNumConditions () const {
@@ -665,7 +665,7 @@ class TVIdxBuilder {
665665 // / \param NextIDs The list of {FalseID, TrueID} indexed by ID
666666 // / The first element [0] should be the root node.
667667 // / \param Offset Offset of index to final decisions.
668- TVIdxBuilder (const SmallVectorImpl<ConditionIDs> &NextIDs, int Offset = 0 );
668+ LLVM_ABI TVIdxBuilder (const SmallVectorImpl<ConditionIDs> &NextIDs, int Offset = 0 );
669669};
670670} // namespace mcdc
671671
@@ -684,21 +684,21 @@ class CounterMappingContext {
684684 void setCounts (ArrayRef<uint64_t > Counts) { CounterValues = Counts; }
685685 void setBitmap (BitVector &&Bitmap_) { Bitmap = std::move (Bitmap_); }
686686
687- void dump (const Counter &C, raw_ostream &OS) const ;
687+ LLVM_ABI void dump (const Counter &C, raw_ostream &OS) const ;
688688 void dump (const Counter &C) const { dump (C, dbgs ()); }
689689
690690 // / Return the number of times that a region of code associated with this
691691 // / counter was executed.
692- Expected<int64_t > evaluate (const Counter &C) const ;
692+ LLVM_ABI Expected<int64_t > evaluate (const Counter &C) const ;
693693
694694 // / Return an MCDC record that indicates executed test vectors and condition
695695 // / pairs.
696- Expected<MCDCRecord>
696+ LLVM_ABI Expected<MCDCRecord>
697697 evaluateMCDCRegion (const CounterMappingRegion &Region,
698698 ArrayRef<const CounterMappingRegion *> Branches,
699699 bool IsVersion11);
700700
701- unsigned getMaxCounterID (const Counter &C) const ;
701+ LLVM_ABI unsigned getMaxCounterID (const Counter &C) const ;
702702};
703703
704704// / Code coverage information for a single function.
@@ -761,7 +761,7 @@ class FunctionRecordIterator
761761 StringRef Filename;
762762
763763 // / Skip records whose primary file is not \c Filename.
764- void skipOtherFiles ();
764+ LLVM_ABI void skipOtherFiles ();
765765
766766public:
767767 FunctionRecordIterator (ArrayRef<FunctionRecord> Records_,
@@ -1007,22 +1007,22 @@ class CoverageMapping {
10071007 // / defined in the specified file. This is guaranteed to return a superset of
10081008 // / such records: extra records not in the file may be included if there is
10091009 // / a hash collision on the filename. Clients must be robust to collisions.
1010- ArrayRef<unsigned >
1010+ LLVM_ABI ArrayRef<unsigned >
10111011 getImpreciseRecordIndicesForFilename (StringRef Filename) const ;
10121012
10131013public:
10141014 CoverageMapping (const CoverageMapping &) = delete ;
10151015 CoverageMapping &operator =(const CoverageMapping &) = delete ;
10161016
10171017 // / Load the coverage mapping using the given readers.
1018- static Expected<std::unique_ptr<CoverageMapping>>
1018+ LLVM_ABI static Expected<std::unique_ptr<CoverageMapping>>
10191019 load (ArrayRef<std::unique_ptr<CoverageMappingReader>> CoverageReaders,
10201020 IndexedInstrProfReader &ProfileReader);
10211021
10221022 // / Load the coverage mapping from the given object files and profile. If
10231023 // / \p Arches is non-empty, it must specify an architecture for each object.
10241024 // / Ignores non-instrumented object files unless all are not instrumented.
1025- static Expected<std::unique_ptr<CoverageMapping>>
1025+ LLVM_ABI static Expected<std::unique_ptr<CoverageMapping>>
10261026 load (ArrayRef<StringRef> ObjectFilenames, StringRef ProfileFilename,
10271027 vfs::FileSystem &FS, ArrayRef<StringRef> Arches = {},
10281028 StringRef CompilationDir = " " ,
@@ -1045,20 +1045,20 @@ class CoverageMapping {
10451045
10461046 // / Returns a lexicographically sorted, unique list of files that are
10471047 // / covered.
1048- std::vector<StringRef> getUniqueSourceFiles () const ;
1048+ LLVM_ABI std::vector<StringRef> getUniqueSourceFiles () const ;
10491049
10501050 // / Get the coverage for a particular file.
10511051 // /
10521052 // / The given filename must be the name as recorded in the coverage
10531053 // / information. That is, only names returned from getUniqueSourceFiles will
10541054 // / yield a result.
1055- CoverageData getCoverageForFile (StringRef Filename) const ;
1055+ LLVM_ABI CoverageData getCoverageForFile (StringRef Filename) const ;
10561056
10571057 // / Get the coverage for a particular function.
1058- CoverageData getCoverageForFunction (const FunctionRecord &Function) const ;
1058+ LLVM_ABI CoverageData getCoverageForFunction (const FunctionRecord &Function) const ;
10591059
10601060 // / Get the coverage for an expansion within a coverage set.
1061- CoverageData getCoverageForExpansion (const ExpansionRecord &Expansion) const ;
1061+ LLVM_ABI CoverageData getCoverageForExpansion (const ExpansionRecord &Expansion) const ;
10621062
10631063 // / Gets all of the functions covered by this profile.
10641064 iterator_range<FunctionRecordIterator> getCoveredFunctions () const {
@@ -1079,7 +1079,7 @@ class CoverageMapping {
10791079 // /
10801080 // / Every instantiation group in a program is attributed to exactly one file:
10811081 // / the file in which the definition for the common function begins.
1082- std::vector<InstantiationGroup>
1082+ LLVM_ABI std::vector<InstantiationGroup>
10831083 getInstantiationGroups (StringRef Filename) const ;
10841084};
10851085
@@ -1096,7 +1096,7 @@ class LineCoverageStats {
10961096 LineCoverageStats () = default ;
10971097
10981098public:
1099- LineCoverageStats (ArrayRef<const CoverageSegment *> LineSegments,
1099+ LLVM_ABI LineCoverageStats (ArrayRef<const CoverageSegment *> LineSegments,
11001100 const CoverageSegment *WrappedSegment, unsigned Line);
11011101
11021102 uint64_t getExecutionCount () const { return ExecutionCount; }
@@ -1136,7 +1136,7 @@ class LineCoverageIterator
11361136
11371137 const LineCoverageStats &operator *() const { return Stats; }
11381138
1139- LineCoverageIterator &operator ++();
1139+ LLVM_ABI LineCoverageIterator &operator ++();
11401140
11411141 LineCoverageIterator getEnd () const {
11421142 auto EndIt = *this ;
0 commit comments