projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d8146f
)
[IR/Diagnostic] Assert that DebugLoc is valid before accessing.
author
Davide Italiano
<davide@freebsd.org>
Mon, 4 May 2015 18:08:35 +0000
(18:08 +0000)
committer
Davide Italiano
<davide@freebsd.org>
Mon, 4 May 2015 18:08:35 +0000
(18:08 +0000)
PR: 23380
Differential Revision: http://reviews.llvm.org/D9464
Reviewed by: dexonsmith
llvm-svn: 236435
llvm/lib/IR/DiagnosticInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/IR/DiagnosticInfo.cpp
b/llvm/lib/IR/DiagnosticInfo.cpp
index
b161d07
..
45be100
100644
(file)
--- a/
llvm/lib/IR/DiagnosticInfo.cpp
+++ b/
llvm/lib/IR/DiagnosticInfo.cpp
@@
-136,6
+136,7
@@
void DiagnosticInfoOptimizationBase::getLocation(StringRef *Filename,
unsigned *Line,
unsigned *Column) const {
DILocation *L = getDebugLoc();
+ assert(L != nullptr && "debug location is invalid");
*Filename = L->getFilename();
*Line = L->getLine();
*Column = L->getColumn();