summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-03-04 06:09:53 +0000
committerZachary Turner <zturner@google.com>2015-03-04 06:09:53 +0000
commit653236596af12b89fd3701f86b160a850ddcff21 (patch)
tree189942c606d6e482acf91a3e87e215cca748b31e /llvm/lib/DebugInfo
parent90746340029f43ac3bfd53a08175b92082e26cfd (diff)
downloadbcm5719-llvm-653236596af12b89fd3701f86b160a850ddcff21.tar.gz
bcm5719-llvm-653236596af12b89fd3701f86b160a850ddcff21.zip
[llvm-pdbdump] Display full enum definitions.
This will now display enum definitions both at the global scope as well as nested inside of classes. Additionally, it will no longer display enums at the global scope if the enum is nested. Instead, it will omit the definition of the enum globally and instead emit it in the corresponding class definition. llvm-svn: 231215
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/PDB/PDBExtras.cpp4
-rw-r--r--llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp12
2 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDBExtras.cpp b/llvm/lib/DebugInfo/PDB/PDBExtras.cpp
index beec3279a8d..4b9437c5824 100644
--- a/llvm/lib/DebugInfo/PDB/PDBExtras.cpp
+++ b/llvm/lib/DebugInfo/PDB/PDBExtras.cpp
@@ -303,7 +303,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const Variant &Value) {
OS << Value.Int64;
break;
case PDB_VariantType::Int8:
- OS << Value.Int8;
+ OS << static_cast<int>(Value.Int8);
break;
case PDB_VariantType::Single:
OS << Value.Single;
@@ -318,7 +318,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const Variant &Value) {
OS << Value.UInt64;
break;
case PDB_VariantType::UInt8:
- OS << Value.UInt8;
+ OS << static_cast<unsigned>(Value.UInt8);
break;
default:
OS << Value.Type;
diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
index 87faef82937..8dd26a342e7 100644
--- a/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
+++ b/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp
@@ -9,7 +9,10 @@
#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h"
+#include "llvm/DebugInfo/PDB/IPDBSession.h"
#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
+#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
+#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h"
#include <utility>
@@ -19,4 +22,13 @@ PDBSymbolTypeEnum::PDBSymbolTypeEnum(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol)
: PDBSymbol(PDBSession, std::move(Symbol)) {}
+std::unique_ptr<PDBSymbolTypeUDT> PDBSymbolTypeEnum::getClassParent() const {
+ return Session.getConcreteSymbolById<PDBSymbolTypeUDT>(getClassParentId());
+}
+
+std::unique_ptr<PDBSymbolTypeBuiltin>
+PDBSymbolTypeEnum::getUnderlyingType() const {
+ return Session.getConcreteSymbolById<PDBSymbolTypeBuiltin>(getTypeId());
+}
+
void PDBSymbolTypeEnum::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
OpenPOWER on IntegriCloud