LLVM 22.0.0git
StripSymbols.cpp File Reference

Go to the source code of this file.

Functions

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, SmallPtrSetImpl< const GlobalValue * > &UsedValues)
 Find values that are marked as llvm.used.
static bool StripSymbolNames (Module &M, bool PreserveDbgInfo)
 StripSymbolNames - Strip symbol names.
static bool stripDebugDeclareImpl (Module &M)
static bool stripDeadDebugInfoImpl (Module &M)

Variables

static cl::opt< boolStripGlobalConstants ("strip-global-constants", cl::init(false), cl::Hidden, cl::desc("Removes debug compile units which reference " "to non-existing global constants"))

Function Documentation

◆ findUsedValues()

void findUsedValues ( GlobalVariable * LLVMUsed,
SmallPtrSetImpl< const GlobalValue * > & UsedValues )
static

◆ OnlyUsedBy()

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

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

Definition at line 47 of file StripSymbols.cpp.

References llvm::Value::users().

Referenced by RemoveDeadConstant().

◆ RemoveDeadConstant()

void RemoveDeadConstant ( Constant * C)
static

◆ stripDeadDebugInfoImpl()

◆ stripDebugDeclareImpl()

◆ StripSymbolNames()

bool StripSymbolNames ( Module & M,
bool PreserveDbgInfo )
static

StripSymbolNames - Strip symbol names.

Definition at line 120 of file StripSymbols.cpp.

References llvm::SmallPtrSetImpl< PtrType >::contains(), findUsedValues(), I, StripSymtab(), and StripTypeNames().

Referenced by llvm::StripNonDebugSymbolsPass::run(), and llvm::StripSymbolsPass::run().

◆ StripSymtab()

void StripSymtab ( ValueSymbolTable & ST,
bool PreserveDbgInfo )
static

Definition at line 78 of file StripSymbols.cpp.

References llvm::cast(), and llvm::isa().

Referenced by StripSymbolNames().

◆ StripTypeNames()

void StripTypeNames ( Module & M,
bool PreserveDbgInfo )
static

Definition at line 91 of file StripSymbols.cpp.

References llvm::TypeFinder::run().

Referenced by StripSymbolNames().

Variable Documentation

◆ StripGlobalConstants

cl::opt< bool > StripGlobalConstants("strip-global-constants", cl::init(false), cl::Hidden, cl::desc("Removes debug compile units which reference " "to non-existing global constants")) ( "strip-global-constants" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Removes debug compile units which reference " "to non-existing global constants")  )
static

Referenced by stripDeadDebugInfoImpl().