summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/TableGen/TGLexer.h10
-rw-r--r--llvm/lib/TableGen/TGParser.h2
2 files changed, 6 insertions, 6 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;
diff --git a/llvm/lib/TableGen/TGParser.h b/llvm/lib/TableGen/TGParser.h
index 89799001d57..840cd2181f2 100644
--- a/llvm/lib/TableGen/TGParser.h
+++ b/llvm/lib/TableGen/TGParser.h
@@ -70,7 +70,7 @@ namespace llvm {
struct DefsetRecord {
SMLoc Loc;
- RecTy *EltTy;
+ RecTy *EltTy = nullptr;
SmallVector<Init *, 16> Elements;
};
OpenPOWER on IntegriCloud