summaryrefslogtreecommitdiff
path: root/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2013-06-28 05:43:10 +0000
committerManman Ren <mren@apple.com>2013-06-28 05:43:10 +0000
commitcbafae6d33031a72ba8219c28cb0e852511f79a3 (patch)
tree3b8b95912dc89368c64583771df01b53557e4a09 /lib/Target/NVPTX/NVPTXAsmPrinter.cpp
parentc084c0945b0530180e8969f5e2017d02d06db130 (diff)
downloadllvm-cbafae6d33031a72ba8219c28cb0e852511f79a3.tar.gz
llvm-cbafae6d33031a72ba8219c28cb0e852511f79a3.tar.bz2
llvm-cbafae6d33031a72ba8219c28cb0e852511f79a3.tar.xz
Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/NVPTX/NVPTXAsmPrinter.cpp')
-rw-r--r--lib/Target/NVPTX/NVPTXAsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index ff73931565..84b088400c 100644
--- a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -279,8 +279,10 @@ void NVPTXAsmPrinter::emitLineNumberAsDotLoc(const MachineInstr &MI) {
const LLVMContext &ctx = MF->getFunction()->getContext();
DIScope Scope(curLoc.getScope(ctx));
- if (!Scope.Verify())
- return;
+ assert((!Scope || Scope.isScope()) &&
+ "Scope of a DebugLoc should be null or a DIScope.");
+ if (!Scope)
+ return;
StringRef fileName(Scope.getFilename());
StringRef dirName(Scope.getDirectory());