summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2017-03-23 16:45:20 +0000
committerAdrian McCarthy <amccarth@google.com>2017-03-23 16:45:20 +0000
commit997a15c3c3cab3c357f63a89ab774a84289b3e09 (patch)
tree843933320a0e0c4e12175b4c0f2f3f5d756ea451 /llvm/include
parenta9876cafe2363800bc928cfe3541c158a98f7074 (diff)
downloadbcm5719-llvm-997a15c3c3cab3c357f63a89ab774a84289b3e09.tar.gz
bcm5719-llvm-997a15c3c3cab3c357f63a89ab774a84289b3e09.zip
Re-land: Make NativeExeSymbol a concrete subclass of NativeRawSymbol [PDB]
The new test should pass on all platforms now that llvm-pdbdump has the `-color-output` option. This moves exe symbol-specific method implementations out of NativeRawSymbol into a concrete subclass. Also adds implementations for hasCTypes and hasPrivateSymbols and a simple test to ensure the native reader can access the summary information for the executable from the PDB. Original Differential Revision: https://reviews.llvm.org/D31059 llvm-svn: 298623
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h39
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h2
2 files changed, 40 insertions, 1 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
new file mode 100644
index 00000000000..9516810539b
--- /dev/null
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
@@ -0,0 +1,39 @@
+//===- NativeExeSymbol.h - native impl for PDBSymbolExe ---------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVEEXESYMBOL_H
+#define LLVM_DEBUGINFO_PDB_NATIVE_NATIVEEXESYMBOL_H
+
+#include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
+#include "llvm/DebugInfo/PDB/Native/NativeSession.h"
+
+namespace llvm {
+namespace pdb {
+
+class NativeExeSymbol : public NativeRawSymbol {
+public:
+ NativeExeSymbol(NativeSession &Session);
+
+ std::unique_ptr<IPDBEnumSymbols>
+ findChildren(PDB_SymType Type) const override;
+
+ uint32_t getAge() const override;
+ std::string getSymbolsFileName() const override;
+ PDB_UniqueId getGuid() const override;
+ bool hasCTypes() const override;
+ bool hasPrivateSymbols() const override;
+
+private:
+ PDBFile &File;
+};
+
+} // namespace pdb
+} // namespace llvm
+
+#endif
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
index e6582068848..655bed9ac17 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
@@ -197,7 +197,7 @@ public:
bool wasInlined() const override;
std::string getUnused() const override;
-private:
+protected:
NativeSession &Session;
};
OpenPOWER on IntegriCloud