#include "llvm/Support/Streams.h"
using namespace llvm;
-namespace {
- cl::opt<bool>
- PrintAll("count-aa-print-all-queries", cl::ReallyHidden);
- cl::opt<bool>
- PrintAllFailures("count-aa-print-all-failed-queries", cl::ReallyHidden);
+static cl::opt<bool>
+PrintAll("count-aa-print-all-queries", cl::ReallyHidden);
+static cl::opt<bool>
+PrintAllFailures("count-aa-print-all-failed-queries", cl::ReallyHidden);
+namespace {
class VISIBILITY_HIDDEN AliasAnalysisCounter
: public ModulePass, public AliasAnalysis {
unsigned No, May, Must;
Module *M;
public:
static char ID; // Class identification, replacement for typeinfo
- AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
+ AliasAnalysisCounter() : ModulePass(&ID) {
No = May = Must = 0;
NoMR = JustRef = JustMod = MR = 0;
}
return AliasAnalysis::getModRefInfo(CS1,CS2);
}
};
-
- char AliasAnalysisCounter::ID = 0;
- RegisterPass<AliasAnalysisCounter>
- X("count-aa", "Count Alias Analysis Query Responses", false, true);
- RegisterAnalysisGroup<AliasAnalysis> Y(X);
}
+char AliasAnalysisCounter::ID = 0;
+static RegisterPass<AliasAnalysisCounter>
+X("count-aa", "Count Alias Analysis Query Responses", false, true);
+static RegisterAnalysisGroup<AliasAnalysis> Y(X);
+
ModulePass *llvm::createAliasAnalysisCounterPass() {
return new AliasAnalysisCounter();
}
if (PrintAll || (PrintAllFailures && R == MayAlias)) {
cerr << AliasString << ":\t";
cerr << "[" << V1Size << "B] ";
- WriteAsOperand(*cerr.stream(), V1, true, M) << ", ";
+ WriteAsOperand(*cerr.stream(), V1, true, M);
+ cerr << ", ";
cerr << "[" << V2Size << "B] ";
- WriteAsOperand(*cerr.stream(), V2, true, M) << "\n";
+ WriteAsOperand(*cerr.stream(), V2, true, M);
+ cerr << "\n";
}
return R;