Move variable "Bits" declaration/definition into the DEBUG block where its usage
is expected.
llvm-svn: 100247
diff --git a/llvm/utils/TableGen/ARMDecoderEmitter.cpp b/llvm/utils/TableGen/ARMDecoderEmitter.cpp
index 12c753b..4bb4602 100644
--- a/llvm/utils/TableGen/ARMDecoderEmitter.cpp
+++ b/llvm/utils/TableGen/ARMDecoderEmitter.cpp
@@ -1547,7 +1547,6 @@
const Record &Def = *CGI.TheDef;
const StringRef Name = Def.getName();
uint8_t Form = getByteField(Def, "Form");
- BitsInit &Bits = getBitsField(Def, "Inst");
if (TN == TARGET_ARM) {
// FIXME: what about Int_MemBarrierV6 and Int_SyncBarrierV6?
@@ -1738,6 +1737,8 @@
}
DEBUG({
+ BitsInit &Bits = getBitsField(Def, "Inst");
+
errs() << " ";
// Dumps the instruction encoding bits.