summaryrefslogtreecommitdiff
path: root/include/llvm/GlobalAlias.h
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-08-01 12:20:36 +0000
committerJay Foad <jay.foad@gmail.com>2011-08-01 12:20:36 +0000
commit4f2d6950fb4dfc91359e549dd454059d2cb2cb5f (patch)
treebe1081b649e47d661af058d65e3ff0968c91430a /include/llvm/GlobalAlias.h
parent87334094482e99940030960d22ddc49c97abf025 (diff)
downloadllvm-4f2d6950fb4dfc91359e549dd454059d2cb2cb5f.tar.gz
llvm-4f2d6950fb4dfc91359e549dd454059d2cb2cb5f.tar.bz2
llvm-4f2d6950fb4dfc91359e549dd454059d2cb2cb5f.tar.xz
The operands of a GlobalAlias are always Constants. Simplify things
accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalAlias.h')
-rw-r--r--include/llvm/GlobalAlias.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h
index 33561b9dce..5a814bf102 100644
--- a/include/llvm/GlobalAlias.h
+++ b/include/llvm/GlobalAlias.h
@@ -23,7 +23,6 @@
namespace llvm {
class Module;
-class Constant;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;
@@ -45,7 +44,7 @@ public:
Constant* Aliasee = 0, Module *Parent = 0);
/// Provide fast operand accessors
- DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
+ DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
/// removeFromParent - This method unlinks 'this' from the containing module,
/// but does not delete it.
@@ -60,10 +59,10 @@ public:
/// set/getAliasee - These methods retrive and set alias target.
void setAliasee(Constant *GV);
const Constant *getAliasee() const {
- return cast_or_null<Constant>(getOperand(0));
+ return getOperand(0);
}
Constant *getAliasee() {
- return cast_or_null<Constant>(getOperand(0));
+ return getOperand(0);
}
/// getAliasedGlobal() - Aliasee can be either global or bitcast of
/// global. This method retrives the global for both aliasee flavours.
@@ -88,7 +87,7 @@ struct OperandTraits<GlobalAlias> :
public FixedNumOperandTraits<GlobalAlias, 1> {
};
-DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalAlias, Value)
+DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(GlobalAlias, Constant)
} // End llvm namespace