@@ -71,13 +71,13 @@ enum class coveragemap_error {
71
71
invalid_or_missing_arch_specifier
72
72
};
73
73
74
- const std::error_category &coveragemap_category ();
74
+ LLVM_ABI const std::error_category &coveragemap_category ();
75
75
76
76
inline std::error_code make_error_code (coveragemap_error E) {
77
77
return std::error_code (static_cast <int >(E), coveragemap_category ());
78
78
}
79
79
80
- class CoverageMapError : public ErrorInfo <CoverageMapError> {
80
+ class LLVM_ABI CoverageMapError : public ErrorInfo<CoverageMapError> {
81
81
public:
82
82
CoverageMapError (coveragemap_error Err, const Twine &ErrStr = Twine())
83
83
: Err(Err), Msg(ErrStr.str()) {
@@ -210,19 +210,19 @@ class CounterExpressionBuilder {
210
210
ArrayRef<CounterExpression> getExpressions () const { return Expressions; }
211
211
212
212
// / 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 );
214
214
215
215
// / Return a counter that represents the expression that subtracts RHS from
216
216
// / LHS.
217
- Counter subtract (Counter LHS, Counter RHS, bool Simplify = true );
217
+ LLVM_ABI Counter subtract (Counter LHS, Counter RHS, bool Simplify = true );
218
218
219
219
// / K to V map. K will be Counter in most cases. V may be Counter or
220
220
// / Expression.
221
221
using SubstMap = std::map<Counter, Counter>;
222
222
223
223
// / \return A counter equivalent to \C, with each term in its
224
224
// / 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);
226
226
};
227
227
228
228
using LineColPair = std::pair<unsigned , unsigned >;
@@ -473,7 +473,7 @@ struct MCDCRecord {
473
473
474
474
// Compare executed test vectors against each other to find an independence
475
475
// pairs for each condition. This processing takes the most time.
476
- void findIndependencePairs ();
476
+ LLVM_ABI void findIndependencePairs ();
477
477
478
478
const CounterMappingRegion &getDecisionRegion () const { return Region; }
479
479
unsigned getNumConditions () const {
@@ -665,7 +665,7 @@ class TVIdxBuilder {
665
665
// / \param NextIDs The list of {FalseID, TrueID} indexed by ID
666
666
// / The first element [0] should be the root node.
667
667
// / \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 );
669
669
};
670
670
} // namespace mcdc
671
671
@@ -684,21 +684,21 @@ class CounterMappingContext {
684
684
void setCounts (ArrayRef<uint64_t > Counts) { CounterValues = Counts; }
685
685
void setBitmap (BitVector &&Bitmap_) { Bitmap = std::move (Bitmap_); }
686
686
687
- void dump (const Counter &C, raw_ostream &OS) const ;
687
+ LLVM_ABI void dump (const Counter &C, raw_ostream &OS) const ;
688
688
void dump (const Counter &C) const { dump (C, dbgs ()); }
689
689
690
690
// / Return the number of times that a region of code associated with this
691
691
// / counter was executed.
692
- Expected<int64_t > evaluate (const Counter &C) const ;
692
+ LLVM_ABI Expected<int64_t > evaluate (const Counter &C) const ;
693
693
694
694
// / Return an MCDC record that indicates executed test vectors and condition
695
695
// / pairs.
696
- Expected<MCDCRecord>
696
+ LLVM_ABI Expected<MCDCRecord>
697
697
evaluateMCDCRegion (const CounterMappingRegion &Region,
698
698
ArrayRef<const CounterMappingRegion *> Branches,
699
699
bool IsVersion11);
700
700
701
- unsigned getMaxCounterID (const Counter &C) const ;
701
+ LLVM_ABI unsigned getMaxCounterID (const Counter &C) const ;
702
702
};
703
703
704
704
// / Code coverage information for a single function.
@@ -761,7 +761,7 @@ class FunctionRecordIterator
761
761
StringRef Filename;
762
762
763
763
// / Skip records whose primary file is not \c Filename.
764
- void skipOtherFiles ();
764
+ LLVM_ABI void skipOtherFiles ();
765
765
766
766
public:
767
767
FunctionRecordIterator (ArrayRef<FunctionRecord> Records_,
@@ -1007,22 +1007,22 @@ class CoverageMapping {
1007
1007
// / defined in the specified file. This is guaranteed to return a superset of
1008
1008
// / such records: extra records not in the file may be included if there is
1009
1009
// / a hash collision on the filename. Clients must be robust to collisions.
1010
- ArrayRef<unsigned >
1010
+ LLVM_ABI ArrayRef<unsigned >
1011
1011
getImpreciseRecordIndicesForFilename (StringRef Filename) const ;
1012
1012
1013
1013
public:
1014
1014
CoverageMapping (const CoverageMapping &) = delete ;
1015
1015
CoverageMapping &operator =(const CoverageMapping &) = delete ;
1016
1016
1017
1017
// / Load the coverage mapping using the given readers.
1018
- static Expected<std::unique_ptr<CoverageMapping>>
1018
+ LLVM_ABI static Expected<std::unique_ptr<CoverageMapping>>
1019
1019
load (ArrayRef<std::unique_ptr<CoverageMappingReader>> CoverageReaders,
1020
1020
IndexedInstrProfReader &ProfileReader);
1021
1021
1022
1022
// / Load the coverage mapping from the given object files and profile. If
1023
1023
// / \p Arches is non-empty, it must specify an architecture for each object.
1024
1024
// / 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>>
1026
1026
load (ArrayRef<StringRef> ObjectFilenames, StringRef ProfileFilename,
1027
1027
vfs::FileSystem &FS, ArrayRef<StringRef> Arches = {},
1028
1028
StringRef CompilationDir = " " ,
@@ -1045,20 +1045,20 @@ class CoverageMapping {
1045
1045
1046
1046
// / Returns a lexicographically sorted, unique list of files that are
1047
1047
// / covered.
1048
- std::vector<StringRef> getUniqueSourceFiles () const ;
1048
+ LLVM_ABI std::vector<StringRef> getUniqueSourceFiles () const ;
1049
1049
1050
1050
// / Get the coverage for a particular file.
1051
1051
// /
1052
1052
// / The given filename must be the name as recorded in the coverage
1053
1053
// / information. That is, only names returned from getUniqueSourceFiles will
1054
1054
// / yield a result.
1055
- CoverageData getCoverageForFile (StringRef Filename) const ;
1055
+ LLVM_ABI CoverageData getCoverageForFile (StringRef Filename) const ;
1056
1056
1057
1057
// / Get the coverage for a particular function.
1058
- CoverageData getCoverageForFunction (const FunctionRecord &Function) const ;
1058
+ LLVM_ABI CoverageData getCoverageForFunction (const FunctionRecord &Function) const ;
1059
1059
1060
1060
// / 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 ;
1062
1062
1063
1063
// / Gets all of the functions covered by this profile.
1064
1064
iterator_range<FunctionRecordIterator> getCoveredFunctions () const {
@@ -1079,7 +1079,7 @@ class CoverageMapping {
1079
1079
// /
1080
1080
// / Every instantiation group in a program is attributed to exactly one file:
1081
1081
// / the file in which the definition for the common function begins.
1082
- std::vector<InstantiationGroup>
1082
+ LLVM_ABI std::vector<InstantiationGroup>
1083
1083
getInstantiationGroups (StringRef Filename) const ;
1084
1084
};
1085
1085
@@ -1096,7 +1096,7 @@ class LineCoverageStats {
1096
1096
LineCoverageStats () = default ;
1097
1097
1098
1098
public:
1099
- LineCoverageStats (ArrayRef<const CoverageSegment *> LineSegments,
1099
+ LLVM_ABI LineCoverageStats (ArrayRef<const CoverageSegment *> LineSegments,
1100
1100
const CoverageSegment *WrappedSegment, unsigned Line);
1101
1101
1102
1102
uint64_t getExecutionCount () const { return ExecutionCount; }
@@ -1136,7 +1136,7 @@ class LineCoverageIterator
1136
1136
1137
1137
const LineCoverageStats &operator *() const { return Stats; }
1138
1138
1139
- LineCoverageIterator &operator ++();
1139
+ LLVM_ABI LineCoverageIterator &operator ++();
1140
1140
1141
1141
LineCoverageIterator getEnd () const {
1142
1142
auto EndIt = *this ;
0 commit comments