diff options
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
| -rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index bdcb225aecb..bf4d7aea446 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -901,9 +901,23 @@ IRForTarget::RewritePersistentAllocs(llvm::Module &llvm_module, llvm::BasicBlock Instruction &inst = *ii; if (AllocaInst *alloc = dyn_cast<AllocaInst>(&inst)) - if (alloc->getName().startswith("$") && - !alloc->getName().startswith("$__lldb")) + { + llvm::StringRef alloc_name = alloc->getName(); + + if (alloc_name.startswith("$") && + !alloc_name.startswith("$__lldb")) + { + if (alloc_name.find_first_of("0123456789") == 1) + { + if (log) + log->Printf("Rejecting a numeric persistent variable."); + + return false; + } + pvar_allocs.push_back(alloc); + } + } } InstrIterator iter; |

