mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Debug Info: drop debug info via upgrading path if version number does not match.
Add a helper function getDebugInfoVersionFromModule to return the debug info version number for a module. "Verifier/module-flags-1.ll" checks for verification errors. It will seg fault when calling getDebugInfoVersionFromModule because of the incorrect format for module flags in the testing case. We make getModuleFlagsMetadata more robust by checking for error conditions. PR17982 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,6 +57,10 @@ namespace llvm {
|
||||
/// with different address spaces: the instruction is replaced by a pair
|
||||
/// ptrtoint+inttoptr.
|
||||
Value *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy);
|
||||
|
||||
/// Check the debug info version number, if it is out-dated, drop the debug
|
||||
/// info. Return true if module is modified.
|
||||
bool UpgradeDebugInfo(Module &M);
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
@@ -759,6 +759,9 @@ DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);
|
||||
/// Return true if module is modified.
|
||||
bool StripDebugInfo(Module &M);
|
||||
|
||||
/// Return Debug Info Version by checking module flags.
|
||||
unsigned getDebugInfoVersionFromModule(const Module &M);
|
||||
|
||||
/// DebugInfoFinder tries to list all debug info MDNodes used in a module. To
|
||||
/// list debug info MDNodes used by an instruction, DebugInfoFinder uses
|
||||
/// processDeclare, processValue and processLocation to handle DbgDeclareInst,
|
||||
|
Reference in New Issue
Block a user