mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Fix PR23045.
Keep a note in the materializer that we are stripping debug info so that user doing a lazy read of the module don't hit outdated formats. Thanks to Duncan for suggesting the fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233603 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#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"
|
||||
@ -69,11 +70,8 @@ loadFile(const char *argv0, const std::string &FN, LLVMContext &Context) {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user