summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-07-01 18:20:30 +0000
committerManman Ren <mren@apple.com>2013-07-01 18:20:30 +0000
commit08016a657ceb894928a909c39cc5ceee85a0e20b (patch)
tree0192259ee16cd2860f0d8fefa1803c01dfa85ab2 /llvm/lib
parent3a75861b0660d813796bdccba6f57f2b6a0f7f2a (diff)
downloadbcm5719-llvm-08016a657ceb894928a909c39cc5ceee85a0e20b.tar.gz
bcm5719-llvm-08016a657ceb894928a909c39cc5ceee85a0e20b.zip
Debug Info: Scope of a DebugLoc should not be null.
No functionality change. Remove handling for the null case. llvm-svn: 185354
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index d932adc7f3c..1ab39b6fe8c 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1213,13 +1213,10 @@ static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS,
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();
OpenPOWER on IntegriCloud