[llvm] r187333 - Remove use of sprintf added to X86 disassembler tablegen code. Send message with instruction name to errs() instead and use a generic message for the llvm_unreachable. Consistent with other places in this file.
Craig Topper
craig.topper at gmail.com
Sun Jul 28 14:28:03 PDT 2013
Author: ctopper
Date: Sun Jul 28 16:28:02 2013
New Revision: 187333
URL: http://llvm.org/viewvc/llvm-project?rev=187333&view=rev
Log:
Remove use of sprintf added to X86 disassembler tablegen code. Send message with instruction name to errs() instead and use a generic message for the llvm_unreachable. Consistent with other places in this file.
Modified:
llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=187333&r1=187332&r2=187333&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original)
+++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Sun Jul 28 16:28:02 2013
@@ -19,7 +19,6 @@
#include "X86ModRMFilters.h"
#include "llvm/Support/ErrorHandling.h"
#include <string>
-#include <stdio.h>
using namespace llvm;
@@ -308,9 +307,8 @@ InstructionContext RecognizableInstr::in
if (HasEVEXPrefix) {
if (HasVEX_LPrefix && HasEVEX_L2Prefix) {
- char msg[200];
- sprintf(msg, "Don't support VEX.L if EVEX_L2 is enabled: %s", Name.c_str());
- llvm_unreachable(msg);
+ errs() << "Don't support VEX.L if EVEX_L2 is enabled: " << Name << "\n";
+ llvm_unreachable("Don't support VEX.L if EVEX_L2 is enabled");
}
// VEX_L & VEX_W
if (HasVEX_LPrefix && HasVEX_WPrefix) {
More information about the llvm-commits
mailing list