If we see that we're emitting code for a function that doesn't have

any lexical scopes then go ahead and turn on DW_AT_ranges for the
compile unit since we would be claiming to describe in the CU
a range for which we don't have information in the CU otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-03-14 20:53:49 +00:00
parent 895ec9ed94
commit 82899d9d60
2 changed files with 59 additions and 1 deletions

View File

@ -1462,8 +1462,10 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
// Grab the lexical scopes for the function, if we don't have any of those
// then we're not going to be able to do anything.
LScopes.initialize(*MF);
if (LScopes.empty())
if (LScopes.empty()) {
UsedNonDefaultText = true;
return;
}
assert(UserVariables.empty() && DbgValues.empty() && "Maps weren't cleaned");