diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-10 11:19:50 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-10 11:19:50 +0000 |
commit | 616a7f6ca0ac1e09919e544cb3cebb613bc9938e (patch) | |
tree | e9870e588ce763a7bc8865b871facc8040de4da9 /llvm/lib/TableGen/TGLexer.h | |
parent | b96ebc0a4245382c32fcbd21a815262788ed8438 (diff) | |
download | bcm5719-llvm-616a7f6ca0ac1e09919e544cb3cebb613bc9938e.tar.gz bcm5719-llvm-616a7f6ca0ac1e09919e544cb3cebb613bc9938e.zip |
TableGen - fix uninitialized variable warnings. NFCI.
Diffstat (limited to 'llvm/lib/TableGen/TGLexer.h')
-rw-r--r-- | llvm/lib/TableGen/TGLexer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/TableGen/TGLexer.h b/llvm/lib/TableGen/TGLexer.h index 3085ab2c047..266a9cd5d97 100644 --- a/llvm/lib/TableGen/TGLexer.h +++ b/llvm/lib/TableGen/TGLexer.h @@ -73,18 +73,18 @@ namespace tgtok { class TGLexer { SourceMgr &SrcMgr; - const char *CurPtr; + const char *CurPtr = nullptr; StringRef CurBuf; // Information about the current token. - const char *TokStart; - tgtok::TokKind CurCode; + const char *TokStart = nullptr; + tgtok::TokKind CurCode = tgtok::TokKind::Eof; std::string CurStrVal; // This is valid for ID, STRVAL, VARNAME, CODEFRAGMENT - int64_t CurIntVal; // This is valid for INTVAL. + int64_t CurIntVal = 0; // This is valid for INTVAL. /// CurBuffer - This is the current buffer index we're lexing from as managed /// by the SourceMgr object. - unsigned CurBuffer; + unsigned CurBuffer = 0; public: typedef std::map<std::string, SMLoc> DependenciesMapTy; |