mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-13 01:15:32 +00:00
Debug Info: Scope of a DebugLoc should not be null.
No functionality change. Remove handling for the null case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
222e781d92
commit
c7b61c638b
@ -1213,13 +1213,10 @@ static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS,
|
|||||||
const LLVMContext &Ctx) {
|
const LLVMContext &Ctx) {
|
||||||
if (!DL.isUnknown()) { // Print source line info.
|
if (!DL.isUnknown()) { // Print source line info.
|
||||||
DIScope Scope(DL.getScope(Ctx));
|
DIScope Scope(DL.getScope(Ctx));
|
||||||
assert((!Scope || Scope.isScope()) &&
|
assert(Scope.isScope() &&
|
||||||
"Scope of a DebugLoc should be null or a DIScope.");
|
"Scope of a DebugLoc should be a DIScope.");
|
||||||
// Omit the directory, because it's likely to be long and uninteresting.
|
// Omit the directory, because it's likely to be long and uninteresting.
|
||||||
if (Scope)
|
|
||||||
CommentOS << Scope.getFilename();
|
CommentOS << Scope.getFilename();
|
||||||
else
|
|
||||||
CommentOS << "<unknown>";
|
|
||||||
CommentOS << ':' << DL.getLine();
|
CommentOS << ':' << DL.getLine();
|
||||||
if (DL.getCol() != 0)
|
if (DL.getCol() != 0)
|
||||||
CommentOS << ':' << DL.getCol();
|
CommentOS << ':' << DL.getCol();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user