LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
FileUtilities.cpp File Reference
#include "llvm/Support/FileUtilities.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/system_error.h"
#include <cctype>
#include <cstdlib>
#include <cstring>
Include dependency graph for FileUtilities.cpp:

Go to the source code of this file.

Functions

static bool isSignedChar (char C)
 
static bool isExponentChar (char C)
 
static bool isNumberChar (char C)
 
static const char * BackupNumber (const char *Pos, const char *FirstChar)
 
static const char * EndOfNumber (const char *Pos)
 
static bool CompareNumbers (const char *&F1P, const char *&F2P, const char *F1End, const char *F2End, double AbsTolerance, double RelTolerance, std::string *ErrorMsg)
 CompareNumbers - compare two numbers, returning true if they are different. More...
 

Function Documentation

static const char* BackupNumber ( const char *  Pos,
const char *  FirstChar 
)
static

Definition at line 50 of file FileUtilities.cpp.

References isExponentChar(), isNumberChar(), and isSignedChar().

Referenced by llvm::DiffFilesWithTolerance().

static bool CompareNumbers ( const char *&  F1P,
const char *&  F2P,
const char *  F1End,
const char *  F2End,
double  AbsTolerance,
double  RelTolerance,
std::string *  ErrorMsg 
)
static

CompareNumbers - compare two numbers, returning true if they are different.

Definition at line 81 of file FileUtilities.cpp.

References llvm::LibFunc::abs, EndOfNumber(), isNumberChar(), llvm::LibFunc::strtod, and llvm::NVPTX::PTXLdStInstCode::V2.

Referenced by llvm::DiffFilesWithTolerance().

static const char* EndOfNumber ( const char *  Pos)
static

EndOfNumber - Return the first character that is not part of the specified number. This assumes that the buffer is null terminated, so it won't fall off the end.

Definition at line 74 of file FileUtilities.cpp.

References isNumberChar().

Referenced by CompareNumbers().

static bool isExponentChar ( char  C)
static

Definition at line 31 of file FileUtilities.cpp.

Referenced by BackupNumber(), and isNumberChar().

static bool isNumberChar ( char  C)
static
static bool isSignedChar ( char  C)
static

Definition at line 27 of file FileUtilities.cpp.

Referenced by BackupNumber(), and isNumberChar().