clang API Documentation

Public Member Functions
clang::CodeGen::ArtificialLocation Class Reference

#include <CGDebugInfo.h>

Inheritance diagram for clang::CodeGen::ArtificialLocation:
Inheritance graph
[legend]
Collaboration diagram for clang::CodeGen::ArtificialLocation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ArtificialLocation (CodeGenFunction &CGF, CGBuilderTy &B)
void Emit ()
 ~ArtificialLocation ()
 Autorestore everything back to normal.

Detailed Description

ArtificialLocation - An RAII object that temporarily switches to an artificial debug location that has a valid scope, but no line information. This is useful when emitting compiler-generated helper functions that have no source location associated with them. The DWARF specification allows the compiler to use the special line number 0 to indicate code that can not be attributed to any source location.

This is necessary because passing an empty SourceLocation to CGDebugInfo::setLocation() will result in the last valid location being reused.

Definition at line 486 of file CGDebugInfo.h.


Constructor & Destructor Documentation

Autorestore everything back to normal.

Definition at line 98 of file CGDebugInfo.cpp.

References clang::CodeGen::SaveAndRestoreLocation::Builder, and clang::CodeGen::SaveAndRestoreLocation::DI.


Member Function Documentation


The documentation for this class was generated from the following files: