mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Rename variable. add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104274 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
402d43529c
commit
6ed0ce3240
@ -677,7 +677,7 @@ namespace llvm {
|
|||||||
DIVariable CreateVariable(unsigned Tag, DIDescriptor Context,
|
DIVariable CreateVariable(unsigned Tag, DIDescriptor Context,
|
||||||
StringRef Name,
|
StringRef Name,
|
||||||
DIFile F, unsigned LineNo,
|
DIFile F, unsigned LineNo,
|
||||||
DIType Ty, bool OptimizedBuild = false);
|
DIType Ty, bool AlwaysPreserve = false);
|
||||||
|
|
||||||
/// CreateComplexVariable - Create a new descriptor for the specified
|
/// CreateComplexVariable - Create a new descriptor for the specified
|
||||||
/// variable which has a complex address expression for its address.
|
/// variable which has a complex address expression for its address.
|
||||||
|
@ -1028,7 +1028,7 @@ DIVariable DIFactory::CreateVariable(unsigned Tag, DIDescriptor Context,
|
|||||||
StringRef Name,
|
StringRef Name,
|
||||||
DIFile F,
|
DIFile F,
|
||||||
unsigned LineNo,
|
unsigned LineNo,
|
||||||
DIType Ty, bool OptimizedBuild) {
|
DIType Ty, bool AlwaysPreserve) {
|
||||||
Value *Elts[] = {
|
Value *Elts[] = {
|
||||||
GetTagConstant(Tag),
|
GetTagConstant(Tag),
|
||||||
Context,
|
Context,
|
||||||
@ -1038,7 +1038,10 @@ DIVariable DIFactory::CreateVariable(unsigned Tag, DIDescriptor Context,
|
|||||||
Ty,
|
Ty,
|
||||||
};
|
};
|
||||||
MDNode *Node = MDNode::get(VMContext, &Elts[0], 6);
|
MDNode *Node = MDNode::get(VMContext, &Elts[0], 6);
|
||||||
if (OptimizedBuild) {
|
if (AlwaysPreserve) {
|
||||||
|
// The optimizer may remove local variable. If there is an interest
|
||||||
|
// to preserve variable info in such situation then stash it in a
|
||||||
|
// named mdnode.
|
||||||
NamedMDNode *NMD = M.getOrInsertNamedMetadata("llvm.dbg.lv");
|
NamedMDNode *NMD = M.getOrInsertNamedMetadata("llvm.dbg.lv");
|
||||||
NMD->addOperand(Node);
|
NMD->addOperand(Node);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user