aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfoMetadata.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-10 01:59:57 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-10 01:59:57 +0000
commitbd33d375f08851b774655b2256c03ee707ec49b0 (patch)
tree2562a0bd5cda6e13bc8f6dcbbfb88fd91eb79cda /llvm/lib/IR/DebugInfoMetadata.cpp
parente977a8c747b79affdc5870f7e7c476c33800559b (diff)
downloadllvm-bd33d375f08851b774655b2256c03ee707ec49b0.zip
llvm-bd33d375f08851b774655b2256c03ee707ec49b0.tar.gz
llvm-bd33d375f08851b774655b2256c03ee707ec49b0.tar.bz2
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
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r--llvm/lib/IR/DebugInfoMetadata.cpp25
1 files changed, 13 insertions, 12 deletions
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 @@ void GenericDebugNode::recalculateHash() {
#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 @@ MDNamespace *MDNamespace::getImpl(LLVMContext &Context, Metadata *Scope,
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 *