IR: Remove unnecessary fields from MDTemplateParameter
I noticed this fields were never used in r228607, but I neglected to
propagate that into `MDTemplateParameter` until now. This really should
have been done before commit in r228640; sorry for the churn.
llvm-svn: 228652
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index 68f6bf8..aaf1bc6 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -126,6 +126,10 @@
#define DEFINE_GETIMPL_STORE_NO_OPS(CLASS, ARGS) \
return storeImpl(new (0u) CLASS(Context, Storage, UNWRAP_ARGS(ARGS)), \
Storage, Context.pImpl->CLASS##s)
+#define DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS(CLASS, OPS) \
+ return storeImpl(new (ArrayRef<Metadata *>(OPS).size()) \
+ CLASS(Context, Storage, OPS), \
+ Storage, Context.pImpl->CLASS##s)
MDSubrange *MDSubrange::getImpl(LLVMContext &Context, int64_t Count, int64_t Lo,
StorageType Storage, bool ShouldCreate) {
@@ -290,26 +294,23 @@
MDTemplateTypeParameter *
MDTemplateTypeParameter::getImpl(LLVMContext &Context, Metadata *Scope,
- MDString *Name, Metadata *Type, Metadata *File,
- unsigned Line, unsigned Column,
+ MDString *Name, Metadata *Type,
StorageType Storage, bool ShouldCreate) {
assert(isCanonical(Name) && "Expected canonical MDString");
DEFINE_GETIMPL_LOOKUP(MDTemplateTypeParameter,
- (Scope, getString(Name), Type, File, Line, Column));
- Metadata *Ops[] = {File, Scope, Name, Type};
- DEFINE_GETIMPL_STORE(MDTemplateTypeParameter, (Line, Column), Ops);
+ (Scope, getString(Name), Type));
+ Metadata *Ops[] = {Scope, Name, Type};
+ DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS(MDTemplateTypeParameter, Ops);
}
MDTemplateValueParameter *MDTemplateValueParameter::getImpl(
LLVMContext &Context, unsigned Tag, Metadata *Scope, MDString *Name,
- Metadata *Type, Metadata *Value, Metadata *File, unsigned Line,
- unsigned Column, StorageType Storage, bool ShouldCreate) {
+ Metadata *Type, Metadata *Value, StorageType Storage, bool ShouldCreate) {
assert(isCanonical(Name) && "Expected canonical MDString");
- DEFINE_GETIMPL_LOOKUP(
- MDTemplateValueParameter,
- (Tag, Scope, getString(Name), Type, Value, File, Line, Column));
- Metadata *Ops[] = {File, Scope, Name, Type, Value};
- DEFINE_GETIMPL_STORE(MDTemplateValueParameter, (Tag, Line, Column), Ops);
+ DEFINE_GETIMPL_LOOKUP(MDTemplateValueParameter,
+ (Tag, Scope, getString(Name), Type, Value));
+ Metadata *Ops[] = {Scope, Name, Type, Value};
+ DEFINE_GETIMPL_STORE(MDTemplateValueParameter, (Tag), Ops);
}
MDGlobalVariable *