clang API Documentation
#include <CGDebugInfo.h>
Public Member Functions | |
ArtificialLocation (CodeGenFunction &CGF, CGBuilderTy &B) | |
void | Emit () |
~ArtificialLocation () | |
Autorestore everything back to normal. |
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.
ArtificialLocation::ArtificialLocation | ( | CodeGenFunction & | CGF, |
CGBuilderTy & | B | ||
) |
Definition at line 80 of file CGDebugInfo.cpp.
References clang::CodeGen::SaveAndRestoreLocation::Builder, and clang::CodeGen::SaveAndRestoreLocation::DI.
Autorestore everything back to normal.
Definition at line 98 of file CGDebugInfo.cpp.
References clang::CodeGen::SaveAndRestoreLocation::Builder, and clang::CodeGen::SaveAndRestoreLocation::DI.
void ArtificialLocation::Emit | ( | ) |
Set the current location to line 0, but within the current scope (= the top of the LexicalBlockStack).
Definition at line 86 of file CGDebugInfo.cpp.
References clang::CodeGen::SaveAndRestoreLocation::Builder, clang::CodeGen::SaveAndRestoreLocation::DI, clang::CodeGen::CGDebugInfo::EmitLocation(), and clang::CodeGen::SaveAndRestoreLocation::SavedLoc.
Referenced by clang::CodeGen::CodeGenFunction::GenerateCXXGlobalDtorsFunc(), and clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc().