LLVM API Documentation

FileUtilities.cpp File Reference

#include "llvm/Support/FileUtilities.h"
#include "llvm/System/Path.h"
#include "llvm/System/MappedFile.h"
#include "llvm/ADT/StringExtras.h"
#include <cmath>
#include <cstring>
#include <cctype>

Include dependency graph for FileUtilities.cpp:

Go to the source code of this file.

Functions

static bool isNumberChar (char C)
static char * BackupNumber (char *Pos, char *FirstChar)
static bool CompareNumbers (char *&F1P, char *&F2P, char *F1End, char *F2End, double AbsTolerance, double RelTolerance, std::string *ErrorMsg)
 CompareNumbers - compare two numbers, returning true if they are different.
static void PadFileIfNeeded (char *&FileStart, char *&FileEnd, char *&FP)
int llvm::DiffFilesWithTolerance (const sys::Path &FileA, const sys::Path &FileB, double AbsTol, double RelTol, std::string *Error)


Function Documentation

static char* BackupNumber ( char *  Pos,
char *  FirstChar 
) [static]

Definition at line 37 of file FileUtilities.cpp.

References isNumberChar().

Referenced by llvm::DiffFilesWithTolerance().

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

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

Definition at line 48 of file FileUtilities.cpp.

References llvm::ftostr(), and isNumberChar().

Referenced by llvm::DiffFilesWithTolerance().

static bool isNumberChar ( char  C  )  [static]

Definition at line 24 of file FileUtilities.cpp.

Referenced by BackupNumber(), CompareNumbers(), llvm::DiffFilesWithTolerance(), and PadFileIfNeeded().

static void PadFileIfNeeded ( char *&  FileStart,
char *&  FileEnd,
char *&  FP 
) [static]

Definition at line 123 of file FileUtilities.cpp.

References isNumberChar().

Referenced by llvm::DiffFilesWithTolerance().