summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-07-27 12:47:31 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-07-27 12:47:31 +0000
commitcbbbfe403348379d77a25a20297d8c0bfec2a407 (patch)
treef998624d023dcd729366d8c12a8dc11aa252c050 /llvm/utils
parent31f54027114ab5a8de2b3d6a5f6157b581268dba (diff)
downloadbcm5719-llvm-cbbbfe403348379d77a25a20297d8c0bfec2a407.tar.gz
bcm5719-llvm-cbbbfe403348379d77a25a20297d8c0bfec2a407.zip
[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. llvm-svn: 309267
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/GlobalISelEmitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp
index 47f974ac5ed..9181272adc2 100644
--- a/llvm/utils/TableGen/GlobalISelEmitter.cpp
+++ b/llvm/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, ' ');
OpenPOWER on IntegriCloud