From bd59dff73941e98eb76e6de4cabdc29bd31426e3 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Mon, 31 Jan 2011 20:56:49 +0000 Subject: Error on all .code* directives instead of just .code16 as they all lead to a silent miscompilation of code. llvm-svn: 124603 --- llvm/lib/MC/MCParser/AsmParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index b66eeb9cf01..7a6587811cd 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -1065,8 +1065,8 @@ bool AsmParser::ParseStatement() { if (IDVal == ".include") return ParseDirectiveInclude(); - if (IDVal == ".code16") - return TokError(".code16 not supported yet"); + if (IDVal.startswith(".code")) + return TokError(Twine(IDVal) + " not supported yet"); // Look up the handler in the handler table. std::pair Handler = -- cgit v1.2.3