From 5bb5142e80c9c6eb1a948d6d2ff4834e4e69741f Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Tue, 21 Dec 2021 18:36:54 -0500 Subject: Revert [CodeView] Emit S_OBJNAME record Also revert all subsequent fixes: - abd1cbf5e543f0f114d2742e109ead7d7ddbf9c4 [Clang] Disable debug-info-objname.cpp test on Unix until I sort out the issue. - 00ec441253048f5e30540ea26bb0a28c42a5fc18 [Clang] debug-info-objname.cpp test: explictly encode a x86 target when using %clang_cl to avoid falling back to a native CPU triple. - cd407f6e52b09cce2bef24c74b7f36fedc94991b [Clang] Fix build by restricting debug-info-objname.cpp test to x86. --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index d621108..928252a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -649,7 +649,6 @@ void CodeViewDebug::endModule() { switchToDebugSectionForSymbol(nullptr); MCSymbol *CompilerInfo = beginCVSubsection(DebugSubsectionKind::Symbols); - emitObjName(); emitCompilerInformation(); endCVSubsection(CompilerInfo); @@ -785,29 +784,6 @@ void CodeViewDebug::emitTypeGlobalHashes() { } } -void CodeViewDebug::emitObjName() { - MCSymbol *CompilerEnd = beginSymbolRecord(SymbolKind::S_OBJNAME); - - StringRef PathRef(Asm->TM.Options.ObjectFilenameForDebug); - llvm::SmallString<256> PathStore(PathRef); - - if (PathRef.empty() || PathRef == "-") { - // Don't emit the filename if we're writing to stdout or to /dev/null. - PathRef = {}; - } else { - llvm::sys::path::remove_dots(PathStore, /*remove_dot_dot=*/true); - PathRef = PathStore; - } - - OS.AddComment("Signature"); - OS.emitIntValue(0, 4); - - OS.AddComment("Object name"); - emitNullTerminatedSymbolName(OS, PathRef); - - endSymbolRecord(CompilerEnd); -} - namespace { struct Version { int Part[4]; -- cgit v1.1