aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-09-16 21:12:30 +0000
committerBill Wendling <isanbard@gmail.com>2008-09-16 21:12:30 +0000
commitbdad5cfcd10bce155a51f3658a57ed3866903c5b (patch)
treea78896d298334b38e78ac91f76d4174d14dba3a0 /include/llvm/CodeGen/SelectionDAGNodes.h
parent62e7d9fb481f9a9c7e6ef32e121b5edae09126d8 (diff)
downloadexternal_llvm-bdad5cfcd10bce155a51f3658a57ed3866903c5b.zip
external_llvm-bdad5cfcd10bce155a51f3658a57ed3866903c5b.tar.gz
external_llvm-bdad5cfcd10bce155a51f3658a57ed3866903c5b.tar.bz2
- Change "ExternalSymbolSDNode" to "SymbolSDNode".
- Add linkage to SymbolSDNode (default to external). - Change ISD::ExternalSymbol to ISD::Symbol. - Change ISD::TargetExternalSymbol to ISD::TargetSymbol These changes pave the way to allowing SymbolSDNodes with non-external linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 7cd9eef..4ba5603 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -21,6 +21,7 @@
#include "llvm/Value.h"
#include "llvm/Constants.h"
+#include "llvm/GlobalValue.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/iterator.h"
@@ -89,7 +90,7 @@ namespace ISD {
BasicBlock, VALUETYPE, ARG_FLAGS, CONDCODE, Register,
Constant, ConstantFP,
GlobalAddress, GlobalTLSAddress, FrameIndex,
- JumpTable, ConstantPool, ExternalSymbol,
+ JumpTable, ConstantPool, Symbol,
// The address of the GOT
GLOBAL_OFFSET_TABLE,
@@ -133,7 +134,7 @@ namespace ISD {
TargetFrameIndex,
TargetJumpTable,
TargetConstantPool,
- TargetExternalSymbol,
+ TargetSymbol,
/// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...)
/// This node represents a target intrinsic function with no side effects.
@@ -487,7 +488,7 @@ namespace ISD {
// INLINEASM - Represents an inline asm block. This node always has two
// return values: a chain and a flag result. The inputs are as follows:
// Operand #0 : Input chain.
- // Operand #1 : a ExternalSymbolSDNode with a pointer to the asm string.
+ // Operand #1 : A SymbolSDNode with a pointer to the asm string.
// Operand #2n+2: A RegisterNode.
// Operand #2n+3: A TargetConstant, indicating if the reg is a use/def
// Operand #last: Optional, an incoming flag.
@@ -2045,23 +2046,24 @@ public:
}
};
-class ExternalSymbolSDNode : public SDNode {
+class SymbolSDNode : public SDNode {
const char *Symbol;
+ GlobalValue::LinkageTypes Linkage;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected:
friend class SelectionDAG;
- ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT VT)
- : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol,
- getSDVTList(VT)), Symbol(Sym) {
- }
+ SymbolSDNode(bool isTarget, const char *Sym, MVT VT,
+ GlobalValue::LinkageTypes L)
+ : SDNode(isTarget ? ISD::TargetSymbol : ISD::Symbol,
+ getSDVTList(VT)), Symbol(Sym), Linkage(L) {}
public:
-
const char *getSymbol() const { return Symbol; }
+ GlobalValue::LinkageTypes getLinkage() const { return Linkage; }
- static bool classof(const ExternalSymbolSDNode *) { return true; }
+ static bool classof(const SymbolSDNode *) { return true; }
static bool classof(const SDNode *N) {
- return N->getOpcode() == ISD::ExternalSymbol ||
- N->getOpcode() == ISD::TargetExternalSymbol;
+ return N->getOpcode() == ISD::Symbol ||
+ N->getOpcode() == ISD::TargetSymbol;
}
};