From: Reid Kleckner Date: Thu, 17 Jul 2014 19:43:40 +0000 (+0000) Subject: TableGen: Add 'static' to a large array to avoid a huge stack allocation X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=55ebcf372ded405250ab6c3249ac05bf97fb7499;p=oota-llvm.git TableGen: Add 'static' to a large array to avoid a huge stack allocation Speculative fix for a -Wframe-larger-than warning from gcc. Clang will implicitly promote such constant arrays to globals, so in theory it won't hit this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213298 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index c7fe9dfd685..7ef70d31b69 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -424,7 +424,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) { } // Emit the string itself. - O << " const char AsmStrs[] = {\n"; + O << " static const char AsmStrs[] = {\n"; StringTable.emit(O, printChar); O << " };\n\n";