@@ -64,8 +64,6 @@ using namespace mlir;
64
64
using namespace mlir ::LLVM;
65
65
using namespace mlir ::LLVM::detail;
66
66
67
- extern llvm::cl::opt<bool > UseNewDbgInfoFormat;
68
-
69
67
#include " mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc"
70
68
71
69
namespace {
@@ -1791,9 +1789,6 @@ prepareLLVMModule(Operation *m, llvm::LLVMContext &llvmContext,
1791
1789
StringRef name) {
1792
1790
m->getContext ()->getOrLoadDialect <LLVM::LLVMDialect>();
1793
1791
auto llvmModule = std::make_unique<llvm::Module>(name, llvmContext);
1794
- // ModuleTranslation can currently only construct modules in the old debug
1795
- // info format, so set the flag accordingly.
1796
- llvmModule->setNewDbgInfoFormatFlag (false );
1797
1792
if (auto dataLayoutAttr =
1798
1793
m->getDiscardableAttr (LLVM::LLVMDialect::getDataLayoutAttrName ())) {
1799
1794
llvmModule->setDataLayout (cast<StringAttr>(dataLayoutAttr).getValue ());
@@ -1872,11 +1867,6 @@ mlir::translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext,
1872
1867
if (failed (translator.convertFunctions ()))
1873
1868
return nullptr ;
1874
1869
1875
- // Once we've finished constructing elements in the module, we should convert
1876
- // it to use the debug info format desired by LLVM.
1877
- // See https://llvm.org/docs/RemoveDIsDebugInfo.html
1878
- translator.llvmModule ->setIsNewDbgInfoFormat (UseNewDbgInfoFormat);
1879
-
1880
1870
if (!disableVerification &&
1881
1871
llvm::verifyModule (*translator.llvmModule , &llvm::errs ()))
1882
1872
return nullptr ;
0 commit comments