Coverage Report

Created: 2018-12-11 17:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/Basic/PrettyStackTrace.h
Line
Count
Source
1
//===- clang/Basic/PrettyStackTrace.h - Pretty Crash Handling --*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
///
10
/// \file
11
/// Defines the PrettyStackTraceEntry class, which is used to make
12
/// crashes give more contextual information about what the program was doing
13
/// when it crashed.
14
///
15
//===----------------------------------------------------------------------===//
16
17
#ifndef LLVM_CLANG_BASIC_PRETTYSTACKTRACE_H
18
#define LLVM_CLANG_BASIC_PRETTYSTACKTRACE_H
19
20
#include "clang/Basic/SourceLocation.h"
21
#include "llvm/Support/PrettyStackTrace.h"
22
23
namespace clang {
24
25
  /// If a crash happens while one of these objects are live, the message
26
  /// is printed out along with the specified source location.
27
  class PrettyStackTraceLoc : public llvm::PrettyStackTraceEntry {
28
    SourceManager &SM;
29
    SourceLocation Loc;
30
    const char *Message;
31
  public:
32
    PrettyStackTraceLoc(SourceManager &sm, SourceLocation L, const char *Msg)
33
6.93M
      : SM(sm), Loc(L), Message(Msg) {}
34
    void print(raw_ostream &OS) const override;
35
  };
36
}
37
38
#endif