LLVM API Documentation
#include <SlowOperationInformer.h>
Collaboration diagram for llvm::SlowOperationInformer:
Public Member Functions | |
SlowOperationInformer (const std::string &Name) | |
~SlowOperationInformer () | |
bool | progress (unsigned Amount) |
bool | progress (unsigned Current, unsigned Maximum) |
Definition at line 38 of file SlowOperationInformer.h.
SlowOperationInformer::SlowOperationInformer | ( | const std::string & | Name | ) |
SlowOperationInformer::~SlowOperationInformer | ( | ) |
bool SlowOperationInformer::progress | ( | unsigned | Amount | ) |
progress - Clients should periodically call this method when they can handle cancellation. The Amount variable should indicate how far along the operation is, given in 1/10ths of a percent (in other words, Amount should range from 0 to 1000). If the user cancels the operation, this returns true, false otherwise.
Definition at line 41 of file SlowOperationInformer.cpp.
References llvm::sys::AlarmStatus(), and OS.
Referenced by llvm::ProgramInfo::getSourceFiles(), llvm::ProgramInfo::getSourceFunctions(), and progress().
bool llvm::SlowOperationInformer::progress | ( | unsigned | Current, | |
unsigned | Maximum | |||
) | [inline] |
progress - Same as the method above, but this performs the division for you, and helps you avoid overflow if you are dealing with largish numbers.
Definition at line 58 of file SlowOperationInformer.h.
References progress().