[PATCH] Assert that DebugLoc is valid

Davide Italiano dccitaliano at gmail.com
Mon May 4 11:12:07 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9464

Files:
  llvm/trunk/lib/IR/DiagnosticInfo.cpp

Index: llvm/trunk/lib/IR/DiagnosticInfo.cpp
===================================================================
--- llvm/trunk/lib/IR/DiagnosticInfo.cpp
+++ llvm/trunk/lib/IR/DiagnosticInfo.cpp
@@ -136,6 +136,7 @@
                                                  unsigned *Line,
                                                  unsigned *Column) const {
   DILocation *L = getDebugLoc();
+  assert(L != nullptr && "debug location is invalid");
   *Filename = L->getFilename();
   *Line = L->getLine();
   *Column = L->getColumn();

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9464.24897.patch
Type: text/x-patch
Size: 533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150504/e96a0d9f/attachment.bin>


More information about the llvm-commits mailing list