#include "llvm/Linker/Linker.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Bitcode/ReaderWriter.h"
+#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/LLVMContext.h"
if (!Result)
Err.print(argv0, errs());
- // Fixme (pr23045). We would like to upgrade the metadata with something like
- // Result->materializeMetadata();
- // UpgradeDebugInfo(*Result);
- // but that fails to drop old debug info from function bodies.
- Result->materializeAllPermanently();
+ Result->materializeMetadata();
+ UpgradeDebugInfo(*Result);
return Result;
}