X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FVerifier.cpp;h=cf88e644cea7ffa57ba9dd7271e62487e732f9a9;hb=cf47c180e1e8f6071448555b3a67220a7e72c38a;hp=3c61165768f8a92c55e0b8b36d46518ed24cef3f;hpb=ce2b45bd7dc5dc17de6b50234f8d24ef1fed1d3b;p=oota-llvm.git diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 3c61165768f..cf88e644cea 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -438,6 +438,9 @@ void Verifier::visitGlobalValue(const GlobalValue &GV) { Assert(GVar && GVar->getValueType()->isArrayTy(), "Only global arrays can have appending linkage!", GVar); } + + if (GV.isDeclarationForLinker()) + Assert(!GV.hasComdat(), "Declaration may not be in a Comdat!", &GV); } void Verifier::visitGlobalVariable(const GlobalVariable &GV) {