[llvm] r225200 - IR: Prune arguments to ValueAsMetadata::ValueAsMetadata()
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jan 5 12:41:25 PST 2015
Author: dexonsmith
Date: Mon Jan 5 14:41:25 2015
New Revision: 225200
URL: http://llvm.org/viewvc/llvm-project?rev=225200&view=rev
Log:
IR: Prune arguments to ValueAsMetadata::ValueAsMetadata()
`LLVMContext` isn't actually used.
Modified:
llvm/trunk/include/llvm/IR/Metadata.h
llvm/trunk/lib/IR/Metadata.cpp
Modified: llvm/trunk/include/llvm/IR/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Metadata.h?rev=225200&r1=225199&r2=225200&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Metadata.h (original)
+++ llvm/trunk/include/llvm/IR/Metadata.h Mon Jan 5 14:41:25 2015
@@ -186,7 +186,7 @@ class ValueAsMetadata : public Metadata,
Value *V;
protected:
- ValueAsMetadata(LLVMContext &Context, unsigned ID, Value *V)
+ ValueAsMetadata(unsigned ID, Value *V)
: Metadata(ID), V(V) {
assert(V && "Expected valid value");
}
@@ -236,8 +236,8 @@ public:
class ConstantAsMetadata : public ValueAsMetadata {
friend class ValueAsMetadata;
- ConstantAsMetadata(LLVMContext &Context, Constant *C)
- : ValueAsMetadata(Context, ConstantAsMetadataKind, C) {}
+ ConstantAsMetadata(Constant *C)
+ : ValueAsMetadata(ConstantAsMetadataKind, C) {}
public:
static ConstantAsMetadata *get(Constant *C) {
@@ -259,8 +259,8 @@ public:
class LocalAsMetadata : public ValueAsMetadata {
friend class ValueAsMetadata;
- LocalAsMetadata(LLVMContext &Context, Value *Local)
- : ValueAsMetadata(Context, LocalAsMetadataKind, Local) {
+ LocalAsMetadata(Value *Local)
+ : ValueAsMetadata(LocalAsMetadataKind, Local) {
assert(!isa<Constant>(Local) && "Expected local value");
}
Modified: llvm/trunk/lib/IR/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=225200&r1=225199&r2=225200&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Metadata.cpp (original)
+++ llvm/trunk/lib/IR/Metadata.cpp Mon Jan 5 14:41:25 2015
@@ -255,9 +255,9 @@ ValueAsMetadata *ValueAsMetadata::get(Va
"Expected this to be the only metadata use");
V->NameAndIsUsedByMD.setInt(true);
if (auto *C = dyn_cast<Constant>(V))
- Entry = new ConstantAsMetadata(Context, C);
+ Entry = new ConstantAsMetadata(C);
else
- Entry = new LocalAsMetadata(Context, V);
+ Entry = new LocalAsMetadata(V);
}
return Entry;
More information about the llvm-commits
mailing list