summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Metadata.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 19:26:24 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 19:26:24 +0000
commitb8f796031fbe4f99cb456c7180bf9f695dd01590 (patch)
tree3ccb113e80d50cc71e33e00bcf3bfd258155b821 /llvm/lib/IR/Metadata.cpp
parentf08b8b4be6dd23f7766d5036575ade5f7d7fd6e2 (diff)
downloadbcm5719-llvm-b8f796031fbe4f99cb456c7180bf9f695dd01590.tar.gz
bcm5719-llvm-b8f796031fbe4f99cb456c7180bf9f695dd01590.zip
IR: Remove direct comparisons against Metadata::Storage, NFC
llvm-svn: 226490
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r--llvm/lib/IR/Metadata.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 8a4710444f3..c3bcc8d3473 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -402,7 +402,7 @@ MDNode::MDNode(LLVMContext &Context, unsigned ID, StorageType Storage,
for (unsigned I = 0, E = MDs.size(); I != E; ++I)
setOperand(I, MDs[I]);
- if (Storage == Temporary)
+ if (isTemporary())
this->Context.makeReplaceable(
make_unique<ReplaceableMetadataImpl>(Context));
}
@@ -416,7 +416,7 @@ static bool isOperandUnresolved(Metadata *Op) {
UniquableMDNode::UniquableMDNode(LLVMContext &C, unsigned ID,
StorageType Storage, ArrayRef<Metadata *> Vals)
: MDNode(C, ID, Storage, Vals) {
- if (Storage != Uniqued)
+ if (!isUniqued())
return;
// Check whether any operands are unresolved, requiring re-uniquing.
@@ -432,7 +432,7 @@ UniquableMDNode::UniquableMDNode(LLVMContext &C, unsigned ID,
}
void UniquableMDNode::resolve() {
- assert(Storage == Uniqued && "Expected this to be uniqued");
+ assert(isUniqued() && "Expected this to be uniqued");
assert(!isResolved() && "Expected this to be unresolved");
// Move the map, so that this immediately looks resolved.
OpenPOWER on IntegriCloud