summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineOperand.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-03 06:00:00 +0000
committerChris Lattner <sabre@nondot.org>2009-09-03 06:00:00 +0000
commit36bf49c6b767dfa1dabb2900f25f1c33234d90e7 (patch)
tree6a0f2fcfd5c72c3c842fae7594773d272966229f /include/llvm/CodeGen/MachineOperand.h
parentaadb35f809144596d0bc5a0ae27f212f790057df (diff)
downloadllvm-36bf49c6b767dfa1dabb2900f25f1c33234d90e7.tar.gz
llvm-36bf49c6b767dfa1dabb2900f25f1c33234d90e7.tar.bz2
llvm-36bf49c6b767dfa1dabb2900f25f1c33234d90e7.tar.xz
improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
-rw-r--r--include/llvm/CodeGen/MachineOperand.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h
index 741ed99170..f715c445f8 100644
--- a/include/llvm/CodeGen/MachineOperand.h
+++ b/include/llvm/CodeGen/MachineOperand.h
@@ -110,7 +110,7 @@ private:
GlobalValue *GV; // For MO_GlobalAddress.
MDNode *Node; // For MO_Metadata.
} Val;
- int64_t Offset; // An offset from the object.
+ int64_t Offset; // An offset from the object.
} OffsetedInfo;
} Contents;
@@ -298,6 +298,8 @@ public:
return Contents.OffsetedInfo.Val.Node;
}
+ /// getOffset - Return the offset from the symbol in this operand. This always
+ /// returns 0 for ExternalSymbol operands.
int64_t getOffset() const {
assert((isGlobal() || isSymbol() || isCPI()) &&
"Wrong MachineOperand accessor");