zcov: / include/clang/Basic/PrettyStackTrace.h


Files: 1 Branches Taken: 33.3% 1 / 3
Generated: 2010-02-10 01:31 Branches Executed: 66.7% 2 / 3
Line Coverage: 100.0% 3 / 3


Programs: 8 Runs 14848


       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                 : // This file defines the PrettyStackTraceEntry class, which is used to make
      11                 : // crashes give more contextual information about what the program was doing
      12                 : // when it crashed.
      13                 : //
      14                 : //===----------------------------------------------------------------------===//
      15                 : 
      16                 : #ifndef CLANG_BASIC_PRETTYSTACKTRACE_H
      17                 : #define CLANG_BASIC_PRETTYSTACKTRACE_H
      18                 : 
      19                 : #include "clang/Basic/SourceLocation.h"
      20                 : #include "llvm/Support/PrettyStackTrace.h"
      21                 : 
      22                 : namespace clang {
      23                 : 
      24                 :   /// PrettyStackTraceLoc - If a crash happens while one of these objects are
      25                 :   /// live, the message is printed out along with the specified source location.
                        0: branch 1 not taken
                    66491: branch 2 taken
                        0: branch 6 not taken
      26            66491:   class PrettyStackTraceLoc : public llvm::PrettyStackTraceEntry {
      27                 :     SourceManager &SM;
      28                 :     SourceLocation Loc;
      29                 :     const char *Message;
      30                 :   public:
      31            66491:     PrettyStackTraceLoc(SourceManager &sm, SourceLocation L, const char *Msg)
      32            66491:       : SM(sm), Loc(L), Message(Msg) {}
      33                 :     virtual void print(llvm::raw_ostream &OS) const;
      34                 :   };
      35                 : }
      36                 : 
      37                 : #endif

Generated: 2010-02-10 01:31 by zcov