diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 6f7c4953d27..d5c163f89cd 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -873,11 +873,9 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) { abort(); } switch (GV->getVisibility()) { + default: assert(0 && "Invalid visibility style!"); case GlobalValue::DefaultVisibility: break; case GlobalValue::HiddenVisibility: Out << "hidden "; break; - default: - cerr << "Invalid visibility style!\n"; - abort(); } } @@ -982,11 +980,9 @@ void AssemblyWriter::printFunction(const Function *F) { abort(); } switch (F->getVisibility()) { + default: assert(0 && "Invalid visibility style!"); case GlobalValue::DefaultVisibility: break; case GlobalValue::HiddenVisibility: Out << "hidden "; break; - default: - cerr << "Invalid visibility style!\n"; - abort(); } }