Revert "[DWARFLinker] Capitalize type names (NFC)"

This reverts commit 3fce5ea7ce.

`make check` broken.
This commit is contained in:
Max Kazantsev 2020-10-22 14:57:36 +07:00
parent 51d7df3fa1
commit 113ad90a34
4 changed files with 21 additions and 21 deletions

View File

@ -221,12 +221,12 @@ public:
typedef std::function<void(const Twine &Warning, StringRef Context, typedef std::function<void(const Twine &Warning, StringRef Context,
const DWARFDie *DIE)> const DWARFDie *DIE)>
MessageHandler; messageHandler;
typedef std::function<ErrorOr<DWARFFile &>(StringRef ContainerName, typedef std::function<ErrorOr<DWARFFile &>(StringRef ContainerName,
StringRef Path)> StringRef Path)>
ObjectFileLoader; objFileLoader;
typedef std::map<std::string, std::string> SwiftInterfaceMap; typedef std::map<std::string, std::string> swiftInterfacesMap;
typedef std::map<std::string, std::string> ObjectPrefixMap; typedef std::map<std::string, std::string> objectPrefixMap;
/// The core of the Dwarf linking logic. /// The core of the Dwarf linking logic.
/// ///
@ -295,28 +295,28 @@ public:
} }
/// Set warning handler which would be used to report warnings. /// Set warning handler which would be used to report warnings.
void setWarningHandler(MessageHandler Handler) { void setWarningHandler(messageHandler Handler) {
Options.WarningHandler = Handler; Options.WarningHandler = Handler;
} }
/// Set error handler which would be used to report errors. /// Set error handler which would be used to report errors.
void setErrorHandler(MessageHandler Handler) { void setErrorHandler(messageHandler Handler) {
Options.ErrorHandler = Handler; Options.ErrorHandler = Handler;
} }
/// Set object files loader which would be used to load /// Set object files loader which would be used to load
/// additional objects for splitted dwarf. /// additional objects for splitted dwarf.
void setObjFileLoader(ObjectFileLoader Loader) { void setObjFileLoader(objFileLoader Loader) {
Options.ObjFileLoader = Loader; Options.ObjFileLoader = Loader;
} }
/// Set map for Swift interfaces. /// Set map for Swift interfaces.
void setSwiftInterfaceMap(SwiftInterfaceMap *Map) { void setSwiftInterfacesMap(swiftInterfacesMap *Map) {
Options.ParseableSwiftInterfaces = Map; Options.ParseableSwiftInterfaces = Map;
} }
/// Set prefix map for objects. /// Set prefix map for objects.
void setObjectPrefixMap(ObjectPrefixMap *Map) { void setObjectPrefixMap(objectPrefixMap *Map) {
Options.ObjectPrefixMap = Map; Options.ObjectPrefixMap = Map;
} }
@ -783,22 +783,22 @@ private:
std::string PrependPath; std::string PrependPath;
// warning handler // warning handler
MessageHandler WarningHandler = nullptr; messageHandler WarningHandler = nullptr;
// error handler // error handler
MessageHandler ErrorHandler = nullptr; messageHandler ErrorHandler = nullptr;
ObjectFileLoader ObjFileLoader = nullptr; objFileLoader ObjFileLoader = nullptr;
/// A list of all .swiftinterface files referenced by the debug /// A list of all .swiftinterface files referenced by the debug
/// info, mapping Module name to path on disk. The entries need to /// info, mapping Module name to path on disk. The entries need to
/// be uniqued and sorted and there are only few entries expected /// be uniqued and sorted and there are only few entries expected
/// per compile unit, which is why this is a std::map. /// per compile unit, which is why this is a std::map.
/// this is dsymutil specific fag. /// this is dsymutil specific fag.
SwiftInterfaceMap *ParseableSwiftInterfaces = nullptr; swiftInterfacesMap *ParseableSwiftInterfaces = nullptr;
/// A list of remappings to apply to file paths. /// A list of remappings to apply to file paths.
ObjectPrefixMap *ObjectPrefixMap = nullptr; objectPrefixMap *ObjectPrefixMap = nullptr;
} Options; } Options;
}; };

View File

@ -44,7 +44,7 @@ class DwarfStreamer : public DwarfEmitter {
public: public:
DwarfStreamer(OutputFileType OutFileType, raw_pwrite_stream &OutFile, DwarfStreamer(OutputFileType OutFileType, raw_pwrite_stream &OutFile,
std::function<StringRef(StringRef Input)> Translator, std::function<StringRef(StringRef Input)> Translator,
bool Minimize, MessageHandler Error, MessageHandler Warning) bool Minimize, messageHandler Error, messageHandler Warning)
: OutFile(OutFile), OutFileType(OutFileType), Translator(Translator), : OutFile(OutFile), OutFileType(OutFileType), Translator(Translator),
Minimize(Minimize), ErrorHandler(Error), WarningHandler(Warning) {} Minimize(Minimize), ErrorHandler(Error), WarningHandler(Warning) {}
@ -210,8 +210,8 @@ private:
const CompileUnit &Unit, const CompileUnit &Unit,
const std::vector<CompileUnit::AccelInfo> &Names); const std::vector<CompileUnit::AccelInfo> &Names);
MessageHandler ErrorHandler; messageHandler ErrorHandler = nullptr;
MessageHandler WarningHandler; messageHandler WarningHandler = nullptr;
}; };
} // end namespace llvm } // end namespace llvm

View File

@ -207,7 +207,7 @@ static void resolveRelativeObjectPath(SmallVectorImpl<char> &Buf, DWARFDie CU) {
/// DW_TAG_module blocks. /// DW_TAG_module blocks.
static void analyzeImportedModule( static void analyzeImportedModule(
const DWARFDie &DIE, CompileUnit &CU, const DWARFDie &DIE, CompileUnit &CU,
SwiftInterfaceMap *ParseableSwiftInterfaces, swiftInterfacesMap *ParseableSwiftInterfaces,
std::function<void(const Twine &, const DWARFDie &)> ReportWarning) { std::function<void(const Twine &, const DWARFDie &)> ReportWarning) {
if (CU.getLanguage() != dwarf::DW_LANG_Swift) if (CU.getLanguage() != dwarf::DW_LANG_Swift)
return; return;
@ -252,7 +252,7 @@ static bool analyzeContextInfo(
const DWARFDie &DIE, unsigned ParentIdx, CompileUnit &CU, const DWARFDie &DIE, unsigned ParentIdx, CompileUnit &CU,
DeclContext *CurrentDeclContext, UniquingStringPool &StringPool, DeclContext *CurrentDeclContext, UniquingStringPool &StringPool,
DeclContextTree &Contexts, uint64_t ModulesEndOffset, DeclContextTree &Contexts, uint64_t ModulesEndOffset,
SwiftInterfaceMap *ParseableSwiftInterfaces, swiftInterfacesMap *ParseableSwiftInterfaces,
std::function<void(const Twine &, const DWARFDie &)> ReportWarning, std::function<void(const Twine &, const DWARFDie &)> ReportWarning,
bool InImportedModule = false) { bool InImportedModule = false) {
unsigned MyIdx = CU.getOrigUnit().getDIEIndex(DIE); unsigned MyIdx = CU.getOrigUnit().getDIEIndex(DIE);
@ -1940,7 +1940,7 @@ static uint64_t getDwoId(const DWARFDie &CUDie, const DWARFUnit &Unit) {
} }
static std::string remapPath(StringRef Path, static std::string remapPath(StringRef Path,
const ObjectPrefixMap &ObjectPrefixMap) { const objectPrefixMap &ObjectPrefixMap) {
if (ObjectPrefixMap.empty()) if (ObjectPrefixMap.empty())
return Path.str(); return Path.str();

View File

@ -384,7 +384,7 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) {
llvm_unreachable("Unhandled DebugMap object"); llvm_unreachable("Unhandled DebugMap object");
}); });
GeneralLinker.setSwiftInterfaceMap(&ParseableSwiftInterfaces); GeneralLinker.setSwiftInterfacesMap(&ParseableSwiftInterfaces);
for (const auto &Obj : Map.objects()) { for (const auto &Obj : Map.objects()) {
// N_AST objects (swiftmodule files) should get dumped directly into the // N_AST objects (swiftmodule files) should get dumped directly into the