@@ -336,11 +336,12 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
336336 IndexedInstrProf::Header Header;
337337 Header.Magic = IndexedInstrProf::Magic;
338338 Header.Version = IndexedInstrProf::ProfVersion::CurrentVersion;
339- if (static_cast <bool >(ProfileKind & InstrProfKind::IR ))
339+ if (static_cast <bool >(ProfileKind & InstrProfKind::IRInstrumentation ))
340340 Header.Version |= VARIANT_MASK_IR_PROF;
341- if (static_cast <bool >(ProfileKind & InstrProfKind::CS ))
341+ if (static_cast <bool >(ProfileKind & InstrProfKind::ContextSensitive ))
342342 Header.Version |= VARIANT_MASK_CSIR_PROF;
343- if (static_cast <bool >(ProfileKind & InstrProfKind::BB))
343+ if (static_cast <bool >(ProfileKind &
344+ InstrProfKind::FunctionEntryInstrumentation))
344345 Header.Version |= VARIANT_MASK_INSTR_ENTRY;
345346 if (static_cast <bool >(ProfileKind & InstrProfKind::SingleByteCoverage))
346347 Header.Version |= VARIANT_MASK_BYTE_COVERAGE;
@@ -381,7 +382,7 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
381382 OS.write (0 );
382383 uint64_t CSSummaryOffset = 0 ;
383384 uint64_t CSSummarySize = 0 ;
384- if (static_cast <bool >(ProfileKind & InstrProfKind::CS )) {
385+ if (static_cast <bool >(ProfileKind & InstrProfKind::ContextSensitive )) {
385386 CSSummaryOffset = OS.tell ();
386387 CSSummarySize = SummarySize / sizeof (uint64_t );
387388 for (unsigned I = 0 ; I < CSSummarySize; I++)
@@ -438,7 +439,7 @@ Error InstrProfWriter::writeImpl(ProfOStream &OS) {
438439
439440 // For Context Sensitive summary.
440441 std::unique_ptr<IndexedInstrProf::Summary> TheCSSummary = nullptr ;
441- if (static_cast <bool >(ProfileKind & InstrProfKind::CS )) {
442+ if (static_cast <bool >(ProfileKind & InstrProfKind::ContextSensitive )) {
442443 TheCSSummary = IndexedInstrProf::allocSummary (SummarySize);
443444 std::unique_ptr<ProfileSummary> CSPS = CSISB.getSummary ();
444445 setSummary (TheCSSummary.get (), *CSPS);
@@ -553,12 +554,13 @@ void InstrProfWriter::writeRecordInText(StringRef Name, uint64_t Hash,
553554
554555Error InstrProfWriter::writeText (raw_fd_ostream &OS) {
555556 // Check CS first since it implies an IR level profile.
556- if (static_cast <bool >(ProfileKind & InstrProfKind::CS ))
557+ if (static_cast <bool >(ProfileKind & InstrProfKind::ContextSensitive ))
557558 OS << " # CSIR level Instrumentation Flag\n :csir\n " ;
558- else if (static_cast <bool >(ProfileKind & InstrProfKind::IR ))
559+ else if (static_cast <bool >(ProfileKind & InstrProfKind::IRInstrumentation ))
559560 OS << " # IR level Instrumentation Flag\n :ir\n " ;
560561
561- if (static_cast <bool >(ProfileKind & InstrProfKind::BB))
562+ if (static_cast <bool >(ProfileKind &
563+ InstrProfKind::FunctionEntryInstrumentation))
562564 OS << " # Always instrument the function entry block\n :entry_first\n " ;
563565 InstrProfSymtab Symtab;
564566
0 commit comments