From: Daniel Sanders Date: Thu, 27 Jul 2017 12:47:31 +0000 (+0000) Subject: [globalisel][tablegen] Ensure MatchTable's are compile-time constants with constexpr... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=064cf49c35c96359ea016c9f69f1f6768c9a4a16;p=llvm [globalisel][tablegen] Ensure MatchTable's are compile-time constants with constexpr. NFC. This should prevent any re-occurence of the problem where the table was initialized at run-time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309267 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/GlobalISelEmitter.cpp b/utils/TableGen/GlobalISelEmitter.cpp index 47f974ac5ed..9181272adc2 100644 --- a/utils/TableGen/GlobalISelEmitter.cpp +++ b/utils/TableGen/GlobalISelEmitter.cpp @@ -370,7 +370,7 @@ public: void emitDeclaration(raw_ostream &OS) const { unsigned Indentation = 4; - OS << " const static int64_t MatchTable" << ID << "[] = {"; + OS << " constexpr static int64_t MatchTable" << ID << "[] = {"; LineBreak.emit(OS, true, *this); OS << std::string(Indentation, ' ');