Bartleby 0.1.0
A symbol renaming toolkit
Loading...
Searching...
No Matches
Functions
Bartleby.cpp File Reference

Bartleby tool implementation. More...

#include "Bartleby/Bartleby.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/WithColor.h"

Functions

int main (int argc, char **argv)
 

Detailed Description

Bartleby tool implementation.

Author
thb-sb

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)
141 {
142 llvm::cl::HideUnrelatedOptions(Cat);
143 llvm::cl::ParseCommandLineOptions(
144 argc, argv, "Combine and optionally prefix libraries and objects");
145
146 auto B = CollectObjects();
147
148 if (!Prefix.empty()) {
149 const auto N = B.prefixGlobalAndDefinedSymbols(Prefix);
150 llvm::outs() << N << " symbol(s) prefixed\n";
151 }
152
153 if (DisplaySymbolList) {
154 displaySymbols(B);
155 }
156
157 if (auto Err =
158 bartleby::Bartleby::buildFinalArchive(std::move(B), OutputFileName)) {
159 reportError(std::move(Err));
160 }
161 llvm::outs() << OutputFileName << " produced.\n";
162
163 return EXIT_SUCCESS;
164}