From 064cf49c35c96359ea016c9f69f1f6768c9a4a16 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Thu, 27 Jul 2017 12:47:31 +0000 Subject: [PATCH] [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 --- utils/TableGen/GlobalISelEmitter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, ' '); -- 2.50.1