[llvm-pdbdump] Remove unused variables.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 23 Feb 2015 11:33:54 +0000 (11:33 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 23 Feb 2015 11:33:54 +0000 (11:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230216 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-pdbdump/ClassDefinitionDumper.cpp
tools/llvm-pdbdump/VariableDumper.cpp

index d02f75a14cd44d45cbc10d26270a2e3ebdad6429..edf6eb42b2cb18455f0a2f94e232d8e1113f2fad 100644 (file)
@@ -55,7 +55,6 @@ void ClassDefinitionDumper::start(const PDBSymbolTypeUDT &Class,
     if (isa<PDBSymbolTypeBaseClass>(*Child))
       continue;
 
-    SymbolGroup *InsertGroup = nullptr;
     auto &AccessGroup = Groups.find((int)Access)->second;
 
     if (auto Func = dyn_cast<PDBSymbolFunc>(Child.get())) {
index 31348ef1e1799c64df95c5f23f97ca41f2731407..913cfee6622313578e067470a16ce7e084488df4 100644 (file)
@@ -45,12 +45,10 @@ void VariableDumper::start(const PDBSymbolData &Var, raw_ostream &OS,
     dumpSymbolTypeAndName(*VarType, Var.getName(), OS);
     OS << "[" << Var.getValue() << "]";
     break;
-  case PDB_LocType::ThisRel: {
-    int Offset = Var.getOffset();
+  case PDB_LocType::ThisRel:
     OS << "+" << format_hex(Var.getOffset(), 4) << " ";
     dumpSymbolTypeAndName(*VarType, Var.getName(), OS);
     break;
-  }
   default:
     break;
     OS << "unknown(" << LocType << ") " << Var.getName();
@@ -72,7 +70,6 @@ void VariableDumper::dump(const PDBSymbolTypeFunctionSig &Symbol,
 
 void VariableDumper::dump(const PDBSymbolTypePointer &Symbol, raw_ostream &OS,
                           int Indent) {
-  uint32_t PointeeId = Symbol.getTypeId();
   auto PointeeType = Symbol.getPointeeType();
   if (!PointeeType)
     return;
@@ -106,7 +103,6 @@ void VariableDumper::dump(const PDBSymbolTypeUDT &Symbol, raw_ostream &OS,
 void VariableDumper::dumpSymbolTypeAndName(const PDBSymbol &Type,
                                            StringRef Name, raw_ostream &OS) {
   if (auto *ArrayType = dyn_cast<PDBSymbolTypeArray>(&Type)) {
-    bool Done = false;
     std::string IndexSpec;
     raw_string_ostream IndexStream(IndexSpec);
     std::unique_ptr<PDBSymbol> ElementType = ArrayType->getElementType();