LLVM API Documentation

Functions
StripSymbols.cpp File Reference
#include "llvm/Transforms/IPO.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/DebugInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/TypeFinder.h"
#include "llvm/IR/ValueSymbolTable.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/Local.h"
Include dependency graph for StripSymbols.cpp:

Go to the source code of this file.

Functions

 INITIALIZE_PASS (StripSymbols,"strip","Strip all symbols from a module", false, false) ModulePass *llvm
 INITIALIZE_PASS (StripNonDebugSymbols,"strip-nondebug","Strip all symbols, except dbg symbols, from a module", false, false) ModulePass *llvm
 INITIALIZE_PASS (StripDebugDeclare,"strip-debug-declare","Strip all llvm.dbg.declare intrinsics", false, false) ModulePass *llvm
 INITIALIZE_PASS (StripDeadDebugInfo,"strip-dead-debug-info","Strip debug info for unused symbols", false, false) ModulePass *llvm
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 StripTypeNames (Module &M, 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)
static StringRef getRealLinkageName (StringRef LinkageName)

Function Documentation

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

getRealLinkageName - If special LLVM prefix that is used to inform the asm printer to not emit usual symbol prefix before the symbol name is used then return linkage name after skipping this special LLVM prefix.

Definition at line 338 of file StripSymbols.cpp.

References llvm::StringRef::startswith(), and llvm::StringRef::substr().

INITIALIZE_PASS ( StripSymbols  ,
"strip"  ,
"Strip all symbols from a module"  ,
false  ,
false   
)

Definition at line 101 of file StripSymbols.cpp.

INITIALIZE_PASS ( StripNonDebugSymbols  ,
"strip-nondebug"  ,
"Strip all  symbols,
except dbg  symbols,
from a module"  ,
false  ,
false   
)

Definition at line 109 of file StripSymbols.cpp.

INITIALIZE_PASS ( StripDebugDeclare  ,
"strip-debug-declare"  ,
"Strip all llvm.dbg.declare intrinsics"  ,
false  ,
false   
)

Definition at line 118 of file StripSymbols.cpp.

INITIALIZE_PASS ( StripDeadDebugInfo  ,
"strip-dead-debug-info ,
"Strip debug info for unused symbols"  ,
false  ,
false   
)

Definition at line 126 of file StripSymbols.cpp.

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

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

Definition at line 134 of file StripSymbols.cpp.

References llvm::ARM_PROC::I, 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 StripTypeNames ( Module M,
bool  PreserveDbgInfo 
) [static]