LLVM 20.0.0git
Functions
FileUtilities.cpp File Reference
#include "llvm/Support/FileUtilities.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/raw_ostream.h"
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <system_error>

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 charBackupNumber (const char *Pos, const char *FirstChar)
 
static const charEndOfNumber (const char *Pos)
 EndOfNumber - Return the first character that is not part of the specified number.
 
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.
 

Function Documentation

◆ BackupNumber()

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

Definition at line 54 of file FileUtilities.cpp.

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

Referenced by llvm::DiffFilesWithTolerance().

◆ CompareNumbers()

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 85 of file FileUtilities.cpp.

References EndOfNumber(), and isNumberChar().

Referenced by llvm::DiffFilesWithTolerance().

◆ EndOfNumber()

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 78 of file FileUtilities.cpp.

References isNumberChar().

Referenced by CompareNumbers().

◆ isExponentChar()

static bool isExponentChar ( char  C)
static

Definition at line 35 of file FileUtilities.cpp.

References llvm::CallingConv::C.

Referenced by BackupNumber(), and isNumberChar().

◆ isNumberChar()

static bool isNumberChar ( char  C)
static

◆ isSignedChar()

static bool isSignedChar ( char  C)
static

Definition at line 31 of file FileUtilities.cpp.

References llvm::CallingConv::C.

Referenced by BackupNumber(), and isNumberChar().