mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-01 07:30:31 +00:00
cleanups: mark stuff static, only tagdecls should be in anon namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
252b491875
commit
53b1acd06d
@ -63,18 +63,19 @@ static Module *ReadModule(LLVMContext &Context, StringRef Name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct DiffContext {
|
struct DiffContext {
|
||||||
DiffContext(Value *L, Value *R)
|
DiffContext(Value *L, Value *R)
|
||||||
: L(L), R(R), Differences(false), IsFunction(isa<Function>(L)) {}
|
: L(L), R(R), Differences(false), IsFunction(isa<Function>(L)) {}
|
||||||
Value *L;
|
Value *L;
|
||||||
Value *R;
|
Value *R;
|
||||||
bool Differences;
|
bool Differences;
|
||||||
bool IsFunction;
|
bool IsFunction;
|
||||||
DenseMap<Value*,unsigned> LNumbering;
|
DenseMap<Value*,unsigned> LNumbering;
|
||||||
DenseMap<Value*,unsigned> RNumbering;
|
DenseMap<Value*,unsigned> RNumbering;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering) {
|
static void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering){
|
||||||
unsigned IN = 0;
|
unsigned IN = 0;
|
||||||
|
|
||||||
// Arguments get the first numbers.
|
// Arguments get the first numbers.
|
||||||
@ -98,6 +99,7 @@ void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering) {
|
|||||||
assert(!Numbering.empty() && "asked for numbering but numbering was no-op");
|
assert(!Numbering.empty() && "asked for numbering but numbering was no-op");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
class DiffConsumer : public DifferenceEngine::Consumer {
|
class DiffConsumer : public DifferenceEngine::Consumer {
|
||||||
private:
|
private:
|
||||||
raw_ostream &out;
|
raw_ostream &out;
|
||||||
@ -273,7 +275,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
} // end anonymous namespace
|
||||||
|
|
||||||
static void diffGlobal(DifferenceEngine &Engine, Module *L, Module *R,
|
static void diffGlobal(DifferenceEngine &Engine, Module *L, Module *R,
|
||||||
StringRef Name) {
|
StringRef Name) {
|
||||||
@ -292,14 +294,14 @@ static void diffGlobal(DifferenceEngine &Engine, Module *L, Module *R,
|
|||||||
errs() << "No function named @" << Name << " in right module\n";
|
errs() << "No function named @" << Name << " in right module\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
cl::opt<std::string> LeftFilename(cl::Positional,
|
static cl::opt<std::string> LeftFilename(cl::Positional,
|
||||||
cl::desc("<first file>"),
|
cl::desc("<first file>"),
|
||||||
cl::Required);
|
cl::Required);
|
||||||
cl::opt<std::string> RightFilename(cl::Positional,
|
static cl::opt<std::string> RightFilename(cl::Positional,
|
||||||
cl::desc("<second file>"),
|
cl::desc("<second file>"),
|
||||||
cl::Required);
|
cl::Required);
|
||||||
cl::list<std::string> GlobalsToCompare(cl::Positional,
|
static cl::list<std::string> GlobalsToCompare(cl::Positional,
|
||||||
cl::desc("<globals to compare>"));
|
cl::desc("<globals to compare>"));
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv);
|
cl::ParseCommandLineOptions(argc, argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user