From cc8900f66c3a4329b5038fad3324fa438ffae041 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 11 May 2016 13:23:52 +0000 Subject: Delete duplicated verifier test. Also add unittest to show we still detect the errors. llvm-svn: 269182 --- llvm/lib/IR/Verifier.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'llvm/lib/IR/Verifier.cpp') diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 9abe8d850f5..03d2f8a351d 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -557,9 +557,6 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) { &GV); Assert(!GV.hasComdat(), "'common' global may not be in a Comdat!", &GV); } - } else { - Assert(GV.hasExternalLinkage() || GV.hasExternalWeakLinkage(), - "invalid linkage type for global declaration", &GV); } if (GV.hasName() && (GV.getName() == "llvm.global_ctors" || @@ -1963,8 +1960,6 @@ void Verifier::visitFunction(const Function &F) { Assert(MDs.empty(), "unmaterialized function cannot have metadata", &F, MDs.empty() ? nullptr : MDs.front().second); } else if (F.isDeclaration()) { - Assert(F.hasExternalLinkage() || F.hasExternalWeakLinkage(), - "invalid linkage type for function declaration", &F); Assert(MDs.empty(), "function without a body cannot have metadata", &F, MDs.empty() ? nullptr : MDs.front().second); Assert(!F.hasPersonalityFn(), -- cgit v1.2.3