summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
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/unittests
parente977a8c747b79affdc5870f7e7c476c33800559b (diff)
downloadbcm5719-llvm-bd33d375f08851b774655b2256c03ee707ec49b0.tar.gz
bcm5719-llvm-bd33d375f08851b774655b2256c03ee707ec49b0.zip
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/unittests')
-rw-r--r--llvm/unittests/IR/MetadataTest.cpp63
1 files changed, 17 insertions, 46 deletions
diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index 9e244246c41..9bc8164dd48 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -1194,35 +1194,18 @@ TEST_F(MDTemplateTypeParameterTest, get) {
Metadata *Scope = MDTuple::getDistinct(Context, None);
StringRef Name = "template";
Metadata *Type = MDTuple::getDistinct(Context, None);
- Metadata *File = MDTuple::getDistinct(Context, None);
- unsigned Line = 5;
- unsigned Column = 7;
- auto *N = MDTemplateTypeParameter::get(Context, Scope, Name, Type, File, Line,
- Column);
+ auto *N = MDTemplateTypeParameter::get(Context, Scope, Name, Type);
EXPECT_EQ(dwarf::DW_TAG_template_type_parameter, N->getTag());
EXPECT_EQ(Scope, N->getScope());
EXPECT_EQ(Name, N->getName());
EXPECT_EQ(Type, N->getType());
- EXPECT_EQ(File, N->getFile());
- EXPECT_EQ(Line, N->getLine());
- EXPECT_EQ(Column, N->getColumn());
- EXPECT_EQ(N, MDTemplateTypeParameter::get(Context, Scope, Name, Type, File,
- Line, Column));
-
- EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Type, Name, Type, File,
- Line, Column));
- EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, "other", Type, File,
- Line, Column));
- EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, Name, Scope, File,
- Line, Column));
- EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, Name, Type, Scope,
- Line, Column));
- EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, Name, Type, File,
- Line + 1, Column));
- EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, Name, Type, File,
- Line, Column + 1));
+ EXPECT_EQ(N, MDTemplateTypeParameter::get(Context, Scope, Name, Type));
+
+ EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Type, Name, Type));
+ EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, "other", Type));
+ EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, Name, Scope));
}
typedef MetadataTest MDTemplateValueParameterTest;
@@ -1233,40 +1216,28 @@ TEST_F(MDTemplateValueParameterTest, get) {
StringRef Name = "template";
Metadata *Type = MDTuple::getDistinct(Context, None);
Metadata *Value = MDTuple::getDistinct(Context, None);
- Metadata *File = MDTuple::getDistinct(Context, None);
- unsigned Line = 5;
- unsigned Column = 7;
- auto *N = MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type,
- Value, File, Line, Column);
+ auto *N =
+ MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type, Value);
EXPECT_EQ(Tag, N->getTag());
EXPECT_EQ(Scope, N->getScope());
EXPECT_EQ(Name, N->getName());
EXPECT_EQ(Type, N->getType());
EXPECT_EQ(Value, N->getValue());
- EXPECT_EQ(File, N->getFile());
- EXPECT_EQ(Line, N->getLine());
- EXPECT_EQ(Column, N->getColumn());
- EXPECT_EQ(N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type,
- Value, File, Line, Column));
+ EXPECT_EQ(
+ N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type, Value));
EXPECT_NE(N, MDTemplateValueParameter::get(
Context, dwarf::DW_TAG_GNU_template_template_param, Scope,
- Name, Type, Value, File, Line, Column));
- EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Type, Name, Type,
- Value, File, Line, Column));
+ Name, Type, Value));
+ EXPECT_NE(
+ N, MDTemplateValueParameter::get(Context, Tag, Type, Name, Type, Value));
EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Scope, "other", Type,
- Value, File, Line, Column));
+ Value));
EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Scope,
- Value, File, Line, Column));
- EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type,
- Scope, File, Line, Column));
- EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type,
- Value, Scope, Line, Column));
- EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type,
- Value, File, Line + 1, Column));
- EXPECT_NE(N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type,
- Value, File, Line, Column + 1));
+ Value));
+ EXPECT_NE(
+ N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type, Scope));
}
typedef MetadataTest MDGlobalVariableTest;
OpenPOWER on IntegriCloud