Skip to content

Commit

Permalink
Revert abd4515 "[Coverage] Add comment to skipped regions"
Browse files Browse the repository at this point in the history
This casued assertions during Chromium builds. See comment on the code review

> Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757.
> Add comment to skipped regions so we don't track execution count for lines containing only comments.
>
> Differential Revision: https://reviews.llvm.org/D84208

This reverts commit abd4515 and the
follow-up 87d7254.
  • Loading branch information
zmodem committed Jul 22, 2020
1 parent b99898c commit 238bbd4
Show file tree
Hide file tree
Showing 36 changed files with 60 additions and 256 deletions.
5 changes: 0 additions & 5 deletions clang/include/clang/Lex/Preprocessor.h
Expand Up @@ -419,9 +419,6 @@ class Preprocessor {
/// The number of (LexLevel 0) preprocessor tokens.
unsigned TokenCount = 0;

/// Preprocess every token regardless of LexLevel.
bool PreprocessToken = false;

/// The maximum number of (LexLevel 0) tokens before issuing a -Wmax-tokens
/// warning, or zero for unlimited.
unsigned MaxTokens = 0;
Expand Down Expand Up @@ -1041,8 +1038,6 @@ class Preprocessor {
OnToken = std::move(F);
}

void setPreprocessToken(bool Preprocess) { PreprocessToken = Preprocess; }

bool isMacroDefined(StringRef Id) {
return isMacroDefined(&Identifiers.get(Id));
}
Expand Down
8 changes: 5 additions & 3 deletions clang/lib/CodeGen/CodeGenAction.cpp
Expand Up @@ -990,9 +990,11 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {

CoverageSourceInfo *CoverageInfo = nullptr;
// Add the preprocessor callback only when the coverage mapping is generated.
if (CI.getCodeGenOpts().CoverageMapping)
CoverageInfo = CodeGen::CoverageMappingModuleGen::setUpCoverageCallbacks(
CI.getPreprocessor());
if (CI.getCodeGenOpts().CoverageMapping) {
CoverageInfo = new CoverageSourceInfo;
CI.getPreprocessor().addPPCallbacks(
std::unique_ptr<PPCallbacks>(CoverageInfo));
}

std::unique_ptr<BackendConsumer> Result(new BackendConsumer(
BA, CI.getDiagnostics(), CI.getHeaderSearchOpts(),
Expand Down
74 changes: 5 additions & 69 deletions clang/lib/CodeGen/CoverageMappingGen.cpp
Expand Up @@ -35,40 +35,8 @@ using namespace clang;
using namespace CodeGen;
using namespace llvm::coverage;

CoverageSourceInfo *
CoverageMappingModuleGen::setUpCoverageCallbacks(Preprocessor &PP) {
CoverageSourceInfo *CoverageInfo = new CoverageSourceInfo;
PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(CoverageInfo));
PP.addCommentHandler(CoverageInfo);
PP.setPreprocessToken(true);
PP.setTokenWatcher([CoverageInfo](clang::Token Tok) {
// Update previous token location.
CoverageInfo->PrevTokLoc = Tok.getLocation();
CoverageInfo->updateNextTokLoc(Tok.getLocation());
});
return CoverageInfo;
}

void CoverageSourceInfo::SourceRangeSkipped(SourceRange Range, SourceLocation) {
SkippedRanges.push_back({Range});
}

bool CoverageSourceInfo::HandleComment(Preprocessor &PP, SourceRange Range) {
if (PrevTokLoc.isValid() && PrevTokLoc == BeforeCommentLoc)
SkippedRanges.back().Range.setEnd(Range.getEnd());
else {
SkippedRanges.push_back({Range, PrevTokLoc});
BeforeCommentLoc = PrevTokLoc;
}
LastCommentIndex = SkippedRanges.size() - 1;
return false;
}

void CoverageSourceInfo::updateNextTokLoc(SourceLocation Loc) {
if (LastCommentIndex) {
SkippedRanges[LastCommentIndex.getValue()].NextTokLoc = Loc;
LastCommentIndex = None;
}
SkippedRanges.push_back(Range);
}

namespace {
Expand Down Expand Up @@ -306,34 +274,8 @@ class CoverageMappingBuilder {
return None;
}

/// This shrinks the skipped range if it spans a line that contains a
/// non-comment token. If shrinking the skipped range would make it empty,
/// this returns None.
Optional<SpellingRegion> adjustSkippedRange(SourceManager &SM,
SpellingRegion SR,
SourceLocation PrevTokLoc,
SourceLocation NextTokLoc) {
// If Range begin location is invalid, it's not a comment region.
if (PrevTokLoc.isInvalid())
return SR;
unsigned PrevTokLine = SM.getSpellingLineNumber(PrevTokLoc);
unsigned NextTokLine = SM.getSpellingLineNumber(NextTokLoc);
SpellingRegion newSR(SR);
if (SR.LineStart == PrevTokLine) {
newSR.LineStart = SR.LineStart + 1;
newSR.ColumnStart = 1;
}
if (SR.LineEnd == NextTokLine) {
newSR.LineEnd = SR.LineEnd - 1;
newSR.ColumnEnd = 1;
}
if (newSR.isInSourceOrder())
return newSR;
return None;
}

/// Gather all the regions that were skipped by the preprocessor
/// using the constructs like #if or comments.
/// using the constructs like #if.
void gatherSkippedRegions() {
/// An array of the minimum lineStarts and the maximum lineEnds
/// for mapping regions from the appropriate source files.
Expand All @@ -349,22 +291,16 @@ class CoverageMappingBuilder {
}

auto SkippedRanges = CVM.getSourceInfo().getSkippedRanges();
for (auto &I : SkippedRanges) {
SourceRange Range = I.Range;
auto LocStart = Range.getBegin();
auto LocEnd = Range.getEnd();
for (const auto &I : SkippedRanges) {
auto LocStart = I.getBegin();
auto LocEnd = I.getEnd();
assert(SM.isWrittenInSameFile(LocStart, LocEnd) &&
"region spans multiple files");

auto CovFileID = getCoverageFileID(LocStart);
if (!CovFileID)
continue;
SpellingRegion SR{SM, LocStart, LocEnd};
if (Optional<SpellingRegion> res =
adjustSkippedRange(SM, SR, I.PrevTokLoc, I.NextTokLoc))
SR = res.getValue();
else
continue;
auto Region = CounterMappingRegion::makeSkipped(
*CovFileID, SR.LineStart, SR.ColumnStart, SR.LineEnd, SR.ColumnEnd);
// Make sure that we only collect the regions that are inside
Expand Down
36 changes: 3 additions & 33 deletions clang/lib/CodeGen/CoverageMappingGen.h
Expand Up @@ -16,7 +16,6 @@
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/Support/raw_ostream.h"
Expand All @@ -30,42 +29,15 @@ class Preprocessor;
class Decl;
class Stmt;

struct SkippedRange {
SourceRange Range;
// The location of token before the skipped source range.
SourceLocation PrevTokLoc;
// The location of token after the skipped source range.
SourceLocation NextTokLoc;

SkippedRange(SourceRange Range, SourceLocation PrevTokLoc = SourceLocation(),
SourceLocation NextTokLoc = SourceLocation())
: Range(Range), PrevTokLoc(PrevTokLoc), NextTokLoc(NextTokLoc) {}
};

/// Stores additional source code information like skipped ranges which
/// is required by the coverage mapping generator and is obtained from
/// the preprocessor.
class CoverageSourceInfo : public PPCallbacks, public CommentHandler {
// A vector of skipped source ranges and PrevTokLoc with NextTokLoc.
std::vector<SkippedRange> SkippedRanges;
Optional<unsigned> LastCommentIndex = None;

class CoverageSourceInfo : public PPCallbacks {
std::vector<SourceRange> SkippedRanges;
public:
// Location of the token parsed before HandleComment is called. This is
// updated every time Preprocessor::Lex lexes a new token.
SourceLocation PrevTokLoc;
// The location of token before comment.
SourceLocation BeforeCommentLoc;

std::vector<SkippedRange> &getSkippedRanges() {
return SkippedRanges;
}
ArrayRef<SourceRange> getSkippedRanges() const { return SkippedRanges; }

void SourceRangeSkipped(SourceRange Range, SourceLocation EndifLoc) override;

bool HandleComment(Preprocessor &PP, SourceRange Range) override;

void updateNextTokLoc(SourceLocation Loc);
};

namespace CodeGen {
Expand Down Expand Up @@ -94,8 +66,6 @@ class CoverageMappingModuleGen {
uint64_t FilenamesRef);

public:
static CoverageSourceInfo *setUpCoverageCallbacks(Preprocessor &PP);

CoverageMappingModuleGen(CodeGenModule &CGM, CoverageSourceInfo &SourceInfo)
: CGM(CGM), SourceInfo(SourceInfo) {}

Expand Down
3 changes: 1 addition & 2 deletions clang/lib/Lex/Preprocessor.cpp
Expand Up @@ -969,8 +969,7 @@ void Preprocessor::Lex(Token &Result) {
LastTokenWasAt = Result.is(tok::at);
--LexLevel;

if ((LexLevel == 0 || PreprocessToken) &&
!Result.getFlag(Token::IsReinjected)) {
if (LexLevel == 0 && !Result.getFlag(Token::IsReinjected)) {
++TokenCount;
if (OnToken)
OnToken(Result);
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/break.c
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name break.c %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name break.c %s | FileCheck %s

int main() { // CHECK: File 0, [[@LINE]]:12 -> {{[0-9]+}}:2 = #0
int cnt = 0; // CHECK-NEXT: File 0, [[@LINE+1]]:9 -> [[@LINE+1]]:18 = #0
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/builtinmacro.c
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name builtinmacro.c %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name builtinmacro.c %s | FileCheck %s

// Test the coverage mapping generation for built-in macroes.

Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/classtemplate.cpp
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -triple %itanium_abi_triple -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name classtemplate.cpp %t.stripped.cpp > %tmapping
// RUN: %clang_cc1 -triple %itanium_abi_triple -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name classtemplate.cpp %s > %tmapping
// RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-CONSTRUCTOR
// RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-GETTER
// RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-SETTER
Expand Down
7 changes: 3 additions & 4 deletions clang/test/CoverageMapping/comment-in-macro.c
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s | FileCheck %s

#define x1 "" // ...
#define x2 return 0
Expand All @@ -8,5 +7,5 @@ int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+3]]:2 = #0
x1; // CHECK-NEXT: Expansion,File 0, [[@LINE]]:3 -> [[@LINE]]:5 = #0
x2; // CHECK-NEXT: Expansion,File 0, [[@LINE]]:3 -> [[@LINE]]:5 = #0
}
// CHECK-NEXT: File 1, 4:12 -> 4:14 = #0
// CHECK-NEXT: File 2, 5:12 -> 5:20 = #0
// CHECK-NEXT: File 1, 3:12 -> 3:14 = #0
// CHECK-NEXT: File 2, 4:12 -> 4:20 = #0
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/continue.c
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name continue.c %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name continue.c %s | FileCheck %s

int main() { // CHECK: File 0, [[@LINE]]:12 -> [[@LINE+21]]:2 = #0
int j = 0; // CHECK-NEXT: File 0, [[@LINE+2]]:18 -> [[@LINE+2]]:24 = (#0 + #1)
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/coroutine.cpp
@@ -1,7 +1,6 @@
// fixme: the following line is added to cleanup bots, will be removed in weeks.
// RUN: rm -f %S/coroutine.ll
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcoroutines-ts -std=c++14 -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping %t.stripped.cpp -o - | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcoroutines-ts -std=c++14 -emit-llvm -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping %s -o - | FileCheck %s

namespace std::experimental {
template <typename... T>
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/deferred-region.cpp
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -fexceptions -fcxx-exceptions -emit-llvm-only -triple %itanium_abi_triple -main-file-name deferred-region.cpp -I %S/Inputs %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -fexceptions -fcxx-exceptions -emit-llvm-only -triple %itanium_abi_triple -main-file-name deferred-region.cpp -I %S/Inputs %s | FileCheck %s

#define IF if
#define STMT(S) S
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/if.cpp
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -std=c++1z -triple %itanium_abi_triple -main-file-name if.cpp %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -std=c++1z -triple %itanium_abi_triple -main-file-name if.cpp %s | FileCheck %s

int nop() { return 0; }

Expand Down
2 changes: 0 additions & 2 deletions clang/test/CoverageMapping/includehell.cpp
Expand Up @@ -51,15 +51,13 @@ int main() {
// CHECK-START: File [[START3]], 4:29 -> 5:1 = #9

// CHECK-CODE: File [[CODE1:[0-9]]], 1:1 -> 14:1 = #1
// CHECK-CODE: Skipped,File [[CODE1]], 1:1 -> 1:41 = 0
// CHECK-CODE-NEXT: File [[CODE1]], 4:5 -> 4:11 = #1
// CHECK-CODE: File [[CODE1]], 4:13 -> 6:2 = #2
// CHECK-CODE: File [[CODE1]], 6:8 -> 8:2 = (#1 - #2)
// CHECK-CODE-NEXT: File [[CODE1]], 9:5 -> 9:9 = #1
// CHECK-CODE: File [[CODE1]], 9:11 -> 11:2 = #3
// CHECK-CODE: File [[CODE1]], 11:8 -> 13:2 = (#1 - #3)
// CHECK-CODE: File [[CODE2:[0-9]]], 1:1 -> 14:1 = #5
// CHECK-CODE: Skipped,File [[CODE2]], 1:1 -> 1:41 = 0
// CHECK-CODE-NEXT: File [[CODE2]], 4:5 -> 4:11 = #5
// CHECK-CODE: File [[CODE2]], 4:13 -> 6:2 = #6
// CHECK-CODE: File [[CODE2]], 6:8 -> 8:2 = (#5 - #6)
Expand Down
5 changes: 2 additions & 3 deletions clang/test/CoverageMapping/label.cpp
@@ -1,7 +1,6 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name label.cpp %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name label.cpp %s | FileCheck %s

// CHECK: func
// CHECK: func
void func() { // CHECK-NEXT: File 0, [[@LINE]]:13 -> {{[0-9]+}}:2 = #0
int i = 0; // CHECK-NEXT: File 0, [[@LINE+2]]:14 -> [[@LINE+2]]:20 = (#0 + #3)
// CHECK-NEXT: File 0, [[@LINE+1]]:22 -> [[@LINE+1]]:25 = #3
Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/logical.cpp
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name logical.cpp %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name logical.cpp %s | FileCheck %s

int main() { // CHECK: File 0, [[@LINE]]:12 -> [[@LINE+15]]:2 = #0
bool bt = true;
Expand Down
5 changes: 2 additions & 3 deletions clang/test/CoverageMapping/loops.cpp
@@ -1,7 +1,6 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name loops.cpp %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name loops.cpp %s | FileCheck %s

// CHECK: rangedFor
// CHECK: rangedFor
void rangedFor() { // CHECK-NEXT: File 0, [[@LINE]]:18 -> {{[0-9]+}}:2 = #0
int arr[] = { 1, 2, 3, 4, 5 };
int sum = 0; // CHECK: Gap,File 0, [[@LINE+1]]:20 -> [[@LINE+1]]:21 = #1
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CoverageMapping/macro-expressions.cpp
@@ -1,5 +1,5 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macro-expressions.cpp -w %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -std=c++11 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macro-expressions.cpp -w %s | FileCheck %s

#define EXPR(x) (x)
#define NEXPR(x) (!x)
#define DECL(T, x) T x
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CoverageMapping/macroparams2.c
@@ -1,5 +1,5 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macroparams2.c %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macroparams2.c %s | FileCheck %s

#define MACRO(REFS, CALLS) (4 * (CALLS) < (REFS))

struct S {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CoverageMapping/macros.c
@@ -1,5 +1,5 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macros.c %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macros.c %s | FileCheck %s

#define MACRO return; bar()
#define MACRO_2 bar()
#define MACRO_1 return; MACRO_2
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CoverageMapping/macroscopes.cpp
@@ -1,5 +1,5 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macroscopes.cpp %t.stripped.cpp | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macroscopes.cpp %s | FileCheck %s

#define starts_a_scope for (int i = 0; i < 2; ++i) {

#define ends_a_scope \
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CoverageMapping/moremacros.c
@@ -1,5 +1,5 @@
// RUN: %strip_comments > %t.stripped.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macro-expansion.c %t.stripped.c | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name macro-expansion.c %s | FileCheck %s

#define LBRAC {
#define RBRAC }

Expand Down
3 changes: 1 addition & 2 deletions clang/test/CoverageMapping/objc.m
@@ -1,5 +1,4 @@
// RUN: %strip_comments > %t.stripped.m
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name objc.m -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -w %t.stripped.m | FileCheck %s
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name objc.m -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -w %s | FileCheck %s

@interface A
- (void)bork:(int)msg;
Expand Down
5 changes: 2 additions & 3 deletions clang/test/CoverageMapping/pr32679.cpp
@@ -1,6 +1,5 @@
// RUN: %strip_comments > %t.stripped.cpp
// RUN: %clang_cc1 -cc1 -triple i686-pc-windows-msvc19.0.0 -emit-obj -fprofile-instrument=clang -std=c++14 -fdelayed-template-parsing -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name pr32679.cpp -o - %t.stripped.cpp | FileCheck %s -check-prefix=MSABI -implicit-check-not=f2
// RUN: %clang_cc1 -cc1 -triple %itanium_abi_triple -emit-obj -fprofile-instrument=clang -std=c++14 -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name pr32679.cpp -o - %t.stripped.cpp | FileCheck %s -check-prefix=ITANIUM -implicit-check-not=f2
// RUN: %clang_cc1 -cc1 -triple i686-pc-windows-msvc19.0.0 -emit-obj -fprofile-instrument=clang -std=c++14 -fdelayed-template-parsing -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name pr32679.cpp -o - %s | FileCheck %s -check-prefix=MSABI -implicit-check-not=f2
// RUN: %clang_cc1 -cc1 -triple %itanium_abi_triple -emit-obj -fprofile-instrument=clang -std=c++14 -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name pr32679.cpp -o - %s | FileCheck %s -check-prefix=ITANIUM -implicit-check-not=f2

template <typename T, int S1>
struct CreateSpecialization;
Expand Down

0 comments on commit 238bbd4

Please sign in to comment.