summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-10 11:19:50 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-11-10 11:19:50 +0000
commit616a7f6ca0ac1e09919e544cb3cebb613bc9938e (patch)
treee9870e588ce763a7bc8865b871facc8040de4da9 /llvm/lib
parentb96ebc0a4245382c32fcbd21a815262788ed8438 (diff)
downloadbcm5719-llvm-616a7f6ca0ac1e09919e544cb3cebb613bc9938e.tar.gz
bcm5719-llvm-616a7f6ca0ac1e09919e544cb3cebb613bc9938e.zip
TableGen - fix uninitialized variable warnings. NFCI.
Diffstat (limited to 'llvm/lib')
-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