llvm.org GIT mirror llvm / 4f2d695
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 Jay Foad 8 years ago
1 changed file(s) with 4 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2222 namespace llvm {
2323
2424 class Module;
25 class Constant;
2625 template
2726 class SymbolTableListTraits;
2827
4443 Constant* Aliasee = 0, Module *Parent = 0);
4544
4645 /// Provide fast operand accessors
47 DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
46 DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
4847
4948 /// removeFromParent - This method unlinks 'this' from the containing module,
5049 /// but does not delete it.
5958 /// set/getAliasee - These methods retrive and set alias target.
6059 void setAliasee(Constant *GV);
6160 const Constant *getAliasee() const {
62 return cast_or_null(getOperand(0));
61 return getOperand(0);
6362 }
6463 Constant *getAliasee() {
65 return cast_or_null(getOperand(0));
64 return getOperand(0);
6665 }
6766 /// getAliasedGlobal() - Aliasee can be either global or bitcast of
6867 /// global. This method retrives the global for both aliasee flavours.
8786 public FixedNumOperandTraits {
8887 };
8988
90 DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalAlias, Value)
89 DEFINE_TRANSPARENT_CASTED_OPERAND_ACCESSORS(GlobalAlias, Constant)
9190
9291 } // End llvm namespace
9392