mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
IR: Prune arguments to ValueAsMetadata::ValueAsMetadata()
`LLVMContext` isn't actually used. llvm-svn: 225200
This commit is contained in:
parent
9a85ae53a7
commit
6bcaa2e7bc
@ -186,7 +186,7 @@ class ValueAsMetadata : public Metadata, ReplaceableMetadataImpl {
|
||||
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");
|
||||
}
|
||||
|
||||
|
@ -255,9 +255,9 @@ ValueAsMetadata *ValueAsMetadata::get(Value *V) {
|
||||
"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;
|
||||
|
Loading…
Reference in New Issue
Block a user