LLVM API Documentation
#include "llvm/Transforms/IPO.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/GlobalStatus.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include <fstream>
#include <set>
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "internalize" |
Functions | |
STATISTIC (NumAliases,"Number of aliases internalized") | |
STATISTIC (NumFunctions,"Number of functions internalized") | |
STATISTIC (NumGlobals,"Number of global vars internalized") | |
INITIALIZE_PASS (InternalizePass,"internalize","Internalize Global Symbols", false, false) InternalizePass | |
static bool | shouldInternalize (const GlobalValue &GV, const std::set< std::string > &ExternalNames) |
Variables | |
static cl::opt< std::string > | APIFile ("internalize-public-api-file", cl::value_desc("filename"), cl::desc("A file containing list of symbol names to preserve")) |
static cl::list< std::string > | APIList ("internalize-public-api-list", cl::value_desc("list"), cl::desc("A list of symbol names to preserve"), cl::CommaSeparated) |
#define DEBUG_TYPE "internalize" |
Definition at line 37 of file Internalize.cpp.
INITIALIZE_PASS | ( | InternalizePass | , |
"internalize" | , | ||
"Internalize Global Symbols" | , | ||
false | , | ||
false | |||
) |
Definition at line 73 of file Internalize.cpp.
References APIFile, APIList, llvm::PassRegistry::getPassRegistry(), and llvm::initializeInternalizePassPass().
static bool shouldInternalize | ( | const GlobalValue & | GV, |
const std::set< std::string > & | ExternalNames | ||
) | [static] |
Definition at line 108 of file Internalize.cpp.
References llvm::Value::getName(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalValue::hasDLLExportStorageClass(), llvm::GlobalValue::hasLocalLinkage(), and llvm::GlobalValue::isDeclaration().
STATISTIC | ( | NumAliases | , |
"Number of aliases internalized" | |||
) |
STATISTIC | ( | NumGlobals | , |
"Number of global vars internalized" | |||
) |
cl::opt<std::string> APIFile("internalize-public-api-file", cl::value_desc("filename"), cl::desc("A file containing list of symbol names to preserve")) [static] |
Referenced by INITIALIZE_PASS().
cl::list<std::string> APIList("internalize-public-api-list", cl::value_desc("list"), cl::desc("A list of symbol names to preserve"), cl::CommaSeparated) [static] |
Referenced by INITIALIZE_PASS().