mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
bcf0078c33
The way DIA SDK works is that when you request a symbol, it gets assigned an internal identifier that is unique for the life of the session. You can then use this identifier to get back the same symbol, with all of the same internal state that it had before, even if you "destroyed" the original copy of the object you had. This didn't work properly in our native implementation, and if you destroyed an object for a particular symbol, then requested the same symbol again, it would get assigned a new ID and you'd get a fresh copy of the object. In order to fix this some refactoring had to happen to properly reuse cached objects. Some unittests are added to verify that symbol reuse is taking place, making use of the new unittest input feature. llvm-svn: 341503
37 lines
1.0 KiB
C++
37 lines
1.0 KiB
C++
//===- PDBSymbolCustom.h - compiler-specific types --------------*- 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_PDBSYMBOLCUSTOM_H
|
|
#define LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H
|
|
|
|
#include "PDBSymbol.h"
|
|
#include "PDBTypes.h"
|
|
#include "llvm/ADT/SmallVector.h"
|
|
|
|
namespace llvm {
|
|
|
|
class raw_ostream;
|
|
|
|
namespace pdb {
|
|
/// PDBSymbolCustom represents symbols that are compiler-specific and do not
|
|
/// fit anywhere else in the lexical hierarchy.
|
|
/// https://msdn.microsoft.com/en-us/library/d88sf09h.aspx
|
|
class PDBSymbolCustom : public PDBSymbol {
|
|
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Custom)
|
|
public:
|
|
void dump(PDBSymDumper &Dumper) const override;
|
|
|
|
void getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes);
|
|
};
|
|
|
|
} // namespace llvm
|
|
}
|
|
|
|
#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H
|