diff options
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r-- | include/llvm/GlobalValue.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index 40e3a5ace5..fe43ed4f69 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -63,12 +63,11 @@ protected: unsigned Visibility : 2; // The visibility style of this global unsigned Alignment : 16; // Alignment of this symbol, must be power of two std::string Section; // Section to emit this into, empty mean default - - static void destroyThis(GlobalValue*v) { - v->removeDeadConstantUsers(); // remove any dead constants using this. - Constant::destroyThis(v); - } public: + ~GlobalValue() { + removeDeadConstantUsers(); // remove any dead constants using this. + } + unsigned getAlignment() const { return Alignment; } void setAlignment(unsigned Align) { assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); |