mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
IR: Prune arguments to ValueAsMetadata::ValueAsMetadata()
`LLVMContext` isn't actually used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27494b0633
commit
d43539c123
@ -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