aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-31 01:22:29 +0000
committerChris Lattner <sabre@nondot.org>2009-12-31 01:22:29 +0000
commit5d0cacdbb6577f2449986f345858db17dc1bcf59 (patch)
treede365f7b73e384392ca19f8cb9bc0c9600712003 /lib/Bitcode
parentb76359e36e75dfe16c5153c3cac903efbb2cd8d7 (diff)
downloadexternal_llvm-5d0cacdbb6577f2449986f345858db17dc1bcf59.zip
external_llvm-5d0cacdbb6577f2449986f345858db17dc1bcf59.tar.gz
external_llvm-5d0cacdbb6577f2449986f345858db17dc1bcf59.tar.bz2
rename "elements" of metadata to "operands". "Elements" are
things that occur in types. "operands" are things that occur in values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp16
-rw-r--r--lib/Bitcode/Writer/ValueEnumerator.cpp12
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 8454e54..c78a30e 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -475,10 +475,10 @@ static void WriteMDNode(const MDNode *N,
const ValueEnumerator &VE,
BitstreamWriter &Stream,
SmallVector<uint64_t, 64> &Record) {
- for (unsigned i = 0, e = N->getNumElements(); i != e; ++i) {
- if (N->getElement(i)) {
- Record.push_back(VE.getTypeID(N->getElement(i)->getType()));
- Record.push_back(VE.getValueID(N->getElement(i)));
+ for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
+ if (N->getOperand(i)) {
+ Record.push_back(VE.getTypeID(N->getOperand(i)->getType()));
+ Record.push_back(VE.getValueID(N->getOperand(i)));
} else {
Record.push_back(VE.getTypeID(Type::getVoidTy(N->getContext())));
Record.push_back(0);
@@ -535,10 +535,10 @@ static void WriteModuleMetadata(const ValueEnumerator &VE,
Stream.EmitRecord(bitc::METADATA_NAME, Record, 0/*TODO*/);
Record.clear();
- // Write named metadata elements.
- for (unsigned i = 0, e = NMD->getNumElements(); i != e; ++i) {
- if (NMD->getElement(i))
- Record.push_back(VE.getValueID(NMD->getElement(i)));
+ // Write named metadata operands.
+ for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
+ if (NMD->getOperand(i))
+ Record.push_back(VE.getValueID(NMD->getOperand(i)));
else
Record.push_back(0);
}
diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp
index 994dcb3..d8128db 100644
--- a/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -212,8 +212,8 @@ void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) {
MDValues.push_back(std::make_pair(MD, 1U));
MDValueMap[MD] = MDValues.size();
MDValueID = MDValues.size();
- for (unsigned i = 0, e = N->getNumElements(); i != e; ++i) {
- if (Value *V = N->getElement(i))
+ for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
+ if (Value *V = N->getOperand(i))
EnumerateValue(V);
else
EnumerateType(Type::getVoidTy(MD->getContext()));
@@ -222,8 +222,8 @@ void ValueEnumerator::EnumerateMetadata(const MetadataBase *MD) {
}
if (const NamedMDNode *N = dyn_cast<NamedMDNode>(MD)) {
- for (unsigned i = 0, e = N->getNumElements(); i != e; ++i)
- EnumerateValue(N->getElement(i));
+ for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)
+ EnumerateValue(N->getOperand(i));
MDValues.push_back(std::make_pair(MD, 1U));
MDValueMap[MD] = Values.size();
return;
@@ -327,8 +327,8 @@ void ValueEnumerator::EnumerateOperandType(const Value *V) {
}
if (const MDNode *N = dyn_cast<MDNode>(V)) {
- for (unsigned i = 0, e = N->getNumElements(); i != e; ++i)
- if (Value *Elem = N->getElement(i))
+ for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i)
+ if (Value *Elem = N->getOperand(i))
EnumerateOperandType(Elem);
}
} else if (isa<MDString>(V) || isa<MDNode>(V))