[llvm] r185354 - Debug Info: Scope of a DebugLoc should not be null.
Manman Ren
mren at apple.com
Mon Jul 1 11:20:31 PDT 2013
Author: mren
Date: Mon Jul 1 13:20:30 2013
New Revision: 185354
URL: http://llvm.org/viewvc/llvm-project?rev=185354&view=rev
Log:
Debug Info: Scope of a DebugLoc should not be null.
No functionality change. Remove handling for the null case.
Modified:
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=185354&r1=185353&r2=185354&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Mon Jul 1 13:20:30 2013
@@ -1213,13 +1213,10 @@ static void printDebugLoc(DebugLoc DL, r
const LLVMContext &Ctx) {
if (!DL.isUnknown()) { // Print source line info.
DIScope Scope(DL.getScope(Ctx));
- assert((!Scope || Scope.isScope()) &&
- "Scope of a DebugLoc should be null or a DIScope.");
+ assert(Scope.isScope() &&
+ "Scope of a DebugLoc should be a DIScope.");
// Omit the directory, because it's likely to be long and uninteresting.
- if (Scope)
- CommentOS << Scope.getFilename();
- else
- CommentOS << "<unknown>";
+ CommentOS << Scope.getFilename();
CommentOS << ':' << DL.getLine();
if (DL.getCol() != 0)
CommentOS << ':' << DL.getCol();
More information about the llvm-commits
mailing list