summaryrefslogtreecommitdiff
path: root/tools/opt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/AnalysisWrappers.cpp14
-rw-r--r--tools/opt/GraphPrinters.cpp16
2 files changed, 16 insertions, 14 deletions
diff --git a/tools/opt/AnalysisWrappers.cpp b/tools/opt/AnalysisWrappers.cpp
index 2fe5d226ec7..a2b57bb3e11 100644
--- a/tools/opt/AnalysisWrappers.cpp
+++ b/tools/opt/AnalysisWrappers.cpp
@@ -66,12 +66,14 @@ namespace {
AU.setPreservesAll();
}
};
+}
- char ExternalFunctionsPassedConstants::ID = 0;
- RegisterPass<ExternalFunctionsPassedConstants>
+char ExternalFunctionsPassedConstants::ID = 0;
+static RegisterPass<ExternalFunctionsPassedConstants>
P1("print-externalfnconstants",
"Print external fn callsites passed constants");
+namespace {
struct CallGraphPrinter : public ModulePass {
static char ID; // Pass ID, replacement for typeid
CallGraphPrinter() : ModulePass(ID) {}
@@ -85,8 +87,8 @@ namespace {
return false;
}
};
-
- char CallGraphPrinter::ID = 0;
- RegisterPass<CallGraphPrinter>
- P2("print-callgraph", "Print a call graph");
}
+
+char CallGraphPrinter::ID = 0;
+static RegisterPass<CallGraphPrinter>
+ P2("print-callgraph", "Print a call graph");
diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp
index fa4339a0554..6a9e96516db 100644
--- a/tools/opt/GraphPrinters.cpp
+++ b/tools/opt/GraphPrinters.cpp
@@ -79,12 +79,12 @@ namespace {
AU.setPreservesAll();
}
};
-
- char CallGraphPrinter::ID = 0;
- RegisterPass<CallGraphPrinter> P2("dot-callgraph",
- "Print Call Graph to 'dot' file");
}
+char CallGraphPrinter::ID = 0;
+static RegisterPass<CallGraphPrinter> P2("dot-callgraph",
+ "Print Call Graph to 'dot' file");
+
//===----------------------------------------------------------------------===//
// DomInfoPrinter Pass
//===----------------------------------------------------------------------===//
@@ -110,8 +110,8 @@ namespace {
return false;
}
};
-
- char DomInfoPrinter::ID = 0;
- static RegisterPass<DomInfoPrinter>
- DIP("print-dom-info", "Dominator Info Printer", true, true);
}
+
+char DomInfoPrinter::ID = 0;
+static RegisterPass<DomInfoPrinter>
+DIP("print-dom-info", "Dominator Info Printer", true, true);