LLVM API Documentation

StripSymbols.cpp File Reference

#include "llvm/Transforms/IPO.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/DebugInfo.h"
#include "llvm/ValueSymbolTable.h"
#include "llvm/TypeSymbolTable.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/Compiler.h"
#include "llvm/ADT/SmallPtrSet.h"

Include dependency graph for StripSymbols.cpp:

Go to the source code of this file.

Functions

ModulePass * llvm::createStripSymbolsPass (bool OnlyDebugInfo=false)
ModulePass * llvm::createStripNonDebugSymbolsPass ()
ModulePass * llvm::createStripDebugDeclarePass ()
static bool OnlyUsedBy (Value *V, Value *Usr)
 OnlyUsedBy - Return true if V is only used by Usr.
static void RemoveDeadConstant (Constant *C)
static void StripSymtab (ValueSymbolTable &ST, bool PreserveDbgInfo)
static void StripTypeSymtab (TypeSymbolTable &ST, bool PreserveDbgInfo)
static void findUsedValues (GlobalVariable *LLVMUsed, SmallPtrSet< const GlobalValue *, 8 > &UsedValues)
 Find values that are marked as llvm.used.
static bool StripSymbolNames (Module &M, bool PreserveDbgInfo)
 StripSymbolNames - Strip symbol names.
static bool StripDebugInfo (Module &M)

Variables

static RegisterPass< StripSymbols > X ("strip","Strip all symbols from a module")
static RegisterPass
< StripNonDebugSymbols > 
Y ("strip-nondebug","Strip all symbols, except dbg symbols, from a module")
static RegisterPass
< StripDebugDeclare > 
Z ("strip-debug-declare","Strip all llvm.dbg.declare intrinsics")


Function Documentation

static void findUsedValues ( GlobalVariable *  LLVMUsed,
SmallPtrSet< const GlobalValue *, 8 > &  UsedValues 
) [static]

static bool OnlyUsedBy ( Value *  V,
Value *  Usr 
) [static]

OnlyUsedBy - Return true if V is only used by Usr.

Definition at line 105 of file StripSymbols.cpp.

References E, llvm::Value::use_begin(), and llvm::Value::use_end().

Referenced by RemoveDeadConstant().

static void RemoveDeadConstant ( Constant *  C  )  [static]

static bool StripDebugInfo ( Module &  M  )  [static]

static bool StripSymbolNames ( Module &  M,
bool  PreserveDbgInfo 
) [static]

static void StripSymtab ( ValueSymbolTable &  ST,
bool  PreserveDbgInfo 
) [static]

static void StripTypeSymtab ( TypeSymbolTable &  ST,
bool  PreserveDbgInfo 
) [static]


Variable Documentation

char ID [static]

Definition at line 42 of file StripSymbols.cpp.

Definition at line 40 of file StripSymbols.cpp.

RegisterPass<StripSymbols> X("strip","Strip all symbols from a module") [static]

RegisterPass<StripNonDebugSymbols> Y("strip-nondebug","Strip all symbols, except dbg symbols, from a module") [static]

RegisterPass<StripDebugDeclare> Z("strip-debug-declare","Strip all llvm.dbg.declare intrinsics") [static]