}
};
+/// A DINameKind is passed to name search methods to specify a
+/// preference regarding the type of name resolution the caller wants.
+enum class DINameKind { None, ShortName, LinkageName };
+
/// DILineInfoSpecifier - controls which fields of DILineInfo container
/// should be filled with data.
-class DILineInfoSpecifier {
- const uint32_t Flags; // Or'ed flags that set the info we want to fetch.
-public:
- enum Specification {
- FileLineInfo = 1 << 0,
- AbsoluteFilePath = 1 << 1,
- FunctionName = 1 << 2
- };
- // Use file/line info by default.
- DILineInfoSpecifier(uint32_t flags = FileLineInfo) : Flags(flags) {}
- bool needs(Specification spec) const {
- return (Flags & spec) > 0;
- }
+struct DILineInfoSpecifier {
+ enum class FileLineInfoKind { None, Default, AbsoluteFilePath };
+ typedef DINameKind FunctionNameKind;
+
+ FileLineInfoKind FLIKind;
+ FunctionNameKind FNKind;
+
+ DILineInfoSpecifier(FileLineInfoKind FLIKind = FileLineInfoKind::Default,
+ FunctionNameKind FNKind = FunctionNameKind::None)
+ : FLIKind(FLIKind), FNKind(FNKind) {}
};
/// Selects which debug sections get dumped.
DIDT_GnuPubtypes,
DIDT_Str,
DIDT_StrDwo,
- DIDT_StrOffsetsDwo
+ DIDT_StrOffsetsDwo,
+ DIDT_AppleNames,
+ DIDT_AppleTypes,
+ DIDT_AppleNamespaces,
+ DIDT_AppleObjC
};
// In place of applying the relocations to the data we've read from disk we use
virtual ~DIContext();
/// getDWARFContext - get a context for binary DWARF data.
- static DIContext *getDWARFContext(object::ObjectFile *);
+ static DIContext *getDWARFContext(const object::ObjectFile &Obj);
virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All) = 0;