diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 23:42:17 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 23:42:17 +0000 |
| commit | d7d83db5f22d05e5b14b6b1d838668222113c83a (patch) | |
| tree | 295ee828cbd1ba13f6eb1e28b112ef26aebb72fa /lib/Analysis/IPA | |
| parent | d3874049a55fe1af515c4f0d8f5a4040803567cb (diff) | |
| download | external_llvm-d7d83db5f22d05e5b14b6b1d838668222113c83a.zip external_llvm-d7d83db5f22d05e5b14b6b1d838668222113c83a.tar.gz external_llvm-d7d83db5f22d05e5b14b6b1d838668222113c83a.tar.bz2 | |
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
LLVM's footprint and speed up linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
| -rw-r--r-- | lib/Analysis/IPA/Andersens.cpp | 5 | ||||
| -rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 3 | ||||
| -rw-r--r-- | lib/Analysis/IPA/GlobalsModRef.cpp | 8 |
3 files changed, 10 insertions, 6 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index aa2188b..52b1919 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -55,6 +55,7 @@ #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Pass.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/InstIterator.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Analysis/AliasAnalysis.h" @@ -71,8 +72,8 @@ STATISTIC(NumEscapingFunctions, "Number of internal functions that escape"); STATISTIC(NumIndirectCallees , "Number of indirect callees found"); namespace { - class Andersens : public ModulePass, public AliasAnalysis, - private InstVisitor<Andersens> { + class VISIBILITY_HIDDEN Andersens : public ModulePass, public AliasAnalysis, + private InstVisitor<Andersens> { /// Node class - This class is used to represent a memory object in the /// program, and is the primitive used to build the points-to graph. class Node { diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index f69696e..bb96bb2 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -16,6 +16,7 @@ #include "llvm/Module.h" #include "llvm/Instructions.h" #include "llvm/Support/CallSite.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/Streams.h" #include <ostream> using namespace llvm; @@ -35,7 +36,7 @@ namespace { //===----------------------------------------------------------------------===// // BasicCallGraph class definition // -class BasicCallGraph : public CallGraph, public ModulePass { +class VISIBILITY_HIDDEN BasicCallGraph : public CallGraph, public ModulePass { // Root is root of the call graph, or the external node if a 'main' function // couldn't be found. // diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp index 6ac040b..8d41751 100644 --- a/lib/Analysis/IPA/GlobalsModRef.cpp +++ b/lib/Analysis/IPA/GlobalsModRef.cpp @@ -23,8 +23,9 @@ #include "llvm/DerivedTypes.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/CallGraph.h" -#include "llvm/Support/InstIterator.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/InstIterator.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/SCCIterator.h" #include <set> @@ -42,7 +43,7 @@ namespace { /// function in the program. Later, the entries for these functions are /// removed if the function is found to call an external function (in which /// case we know nothing about it. - struct FunctionRecord { + struct VISIBILITY_HIDDEN FunctionRecord { /// GlobalInfo - Maintain mod/ref info for all of the globals without /// addresses taken that are read or written (transitively) by this /// function. @@ -63,7 +64,8 @@ namespace { }; /// GlobalsModRef - The actual analysis pass. - class GlobalsModRef : public ModulePass, public AliasAnalysis { + class VISIBILITY_HIDDEN GlobalsModRef + : public ModulePass, public AliasAnalysis { /// NonAddressTakenGlobals - The globals that do not have their addresses /// taken. std::set<GlobalValue*> NonAddressTakenGlobals; |
