LLVM API Documentation

Globals.cpp File Reference

#include "llvm/GlobalVariable.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
#include "llvm/Support/LeakDetector.h"

Include dependency graph for Globals.cpp:

Go to the source code of this file.

Functions

static bool removeDeadConstantUsers (Constant *C)


Function Documentation

static bool removeDeadConstantUsers ( Constant C  )  [static]

This could be named "SafeToDestroyGlobalValue". It just makes sure that there are no non-constant uses of this GlobalValue. If there aren't then this and the transitive closure of the constants can be deleted. See the destructor for details.

Definition at line 30 of file Globals.cpp.

References llvm::CallingConv::C.