LLVM 20.0.0git
Macros | Functions
LibDriver.cpp File Reference
#include "llvm/ToolDrivers/llvm-lib/LibDriver.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Object/ArchiveWriter.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/COFFModuleDefinition.h"
#include "llvm/Object/WindowsMachineFlag.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#include "Options.inc"

Go to the source code of this file.

Macros

#define OPTTABLE_STR_TABLE_CODE
 
#define OPTION(...)   LLVM_MAKE_OPT_ID(__VA_ARGS__),
 
#define OPTTABLE_PREFIXES_TABLE_CODE
 
#define OPTION(...)   LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),
 

Functions

static std::string getDefaultOutputPath (const NewArchiveMember &FirstMember)
 
static std::vector< StringRefgetSearchPaths (opt::InputArgList *Args, StringSaver &Saver)
 
std::unique_ptr< MemoryBufferopenFile (const Twine &Path)
 
static std::string findInputFile (StringRef File, ArrayRef< StringRef > Paths)
 
static void fatalOpenError (llvm::Error E, Twine File)
 
static void doList (opt::InputArgList &Args)
 
static Expected< COFF::MachineTypesgetCOFFFileMachine (MemoryBufferRef MB)
 
static Expected< COFF::MachineTypesgetBitcodeFileMachine (MemoryBufferRef MB)
 
static bool machineMatches (COFF::MachineTypes LibMachine, COFF::MachineTypes FileMachine)
 
static void appendFile (std::vector< NewArchiveMember > &Members, COFF::MachineTypes &LibMachine, std::string &LibMachineSource, MemoryBufferRef MB)
 

Macro Definition Documentation

◆ OPTION [1/2]

#define OPTION (   ...)    LLVM_MAKE_OPT_ID(__VA_ARGS__),

Definition at line 46 of file LibDriver.cpp.

◆ OPTION [2/2]

#define OPTION (   ...)    LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),

Definition at line 46 of file LibDriver.cpp.

◆ OPTTABLE_PREFIXES_TABLE_CODE

#define OPTTABLE_PREFIXES_TABLE_CODE

Definition at line 51 of file LibDriver.cpp.

◆ OPTTABLE_STR_TABLE_CODE

#define OPTTABLE_STR_TABLE_CODE

Definition at line 40 of file LibDriver.cpp.

Function Documentation

◆ appendFile()

static void appendFile ( std::vector< NewArchiveMember > &  Members,
COFF::MachineTypes LibMachine,
std::string &  LibMachineSource,
MemoryBufferRef  MB 
)
static

◆ doList()

static void doList ( opt::InputArgList Args)
static

◆ fatalOpenError()

static void fatalOpenError ( llvm::Error  E,
Twine  File 
)
static

◆ findInputFile()

static std::string findInputFile ( StringRef  File,
ArrayRef< StringRef Paths 
)
static

Definition at line 112 of file LibDriver.cpp.

References llvm::sys::path::append(), and llvm::sys::fs::exists().

Referenced by llvm::libDriverMain().

◆ getBitcodeFileMachine()

static Expected< COFF::MachineTypes > getBitcodeFileMachine ( MemoryBufferRef  MB)
static

◆ getCOFFFileMachine()

static Expected< COFF::MachineTypes > getCOFFFileMachine ( MemoryBufferRef  MB)
static

◆ getDefaultOutputPath()

static std::string getDefaultOutputPath ( const NewArchiveMember FirstMember)
static

Definition at line 70 of file LibDriver.cpp.

References llvm::NewArchiveMember::Buf, and llvm::sys::path::replace_extension().

Referenced by llvm::libDriverMain().

◆ getSearchPaths()

static std::vector< StringRef > getSearchPaths ( opt::InputArgList Args,
StringSaver Saver 
)
static

◆ machineMatches()

static bool machineMatches ( COFF::MachineTypes  LibMachine,
COFF::MachineTypes  FileMachine 
)
static

◆ openFile()

std::unique_ptr< MemoryBuffer > openFile ( const Twine Path)