diff options
Diffstat (limited to 'include/llvm/IR/GlobalIndirectSymbol.h')
-rw-r--r-- | include/llvm/IR/GlobalIndirectSymbol.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/IR/GlobalIndirectSymbol.h b/include/llvm/IR/GlobalIndirectSymbol.h index 8bc3f90b94aa..d996237aa3ef 100644 --- a/include/llvm/IR/GlobalIndirectSymbol.h +++ b/include/llvm/IR/GlobalIndirectSymbol.h @@ -42,6 +42,10 @@ public: /// Provide fast operand accessors DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant); + void copyAttributesFrom(const GlobalValue *Src) { + GlobalValue::copyAttributesFrom(Src); + } + /// These methods set and retrieve indirect symbol. void setIndirectSymbol(Constant *Symbol) { setOperand(0, Symbol); @@ -54,9 +58,7 @@ public: static_cast<const GlobalIndirectSymbol *>(this)->getIndirectSymbol()); } - const GlobalObject *getBaseObject() const { - return dyn_cast<GlobalObject>(getIndirectSymbol()->stripInBoundsOffsets()); - } + const GlobalObject *getBaseObject() const; GlobalObject *getBaseObject() { return const_cast<GlobalObject *>( static_cast<const GlobalIndirectSymbol *>(this)->getBaseObject()); |