summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.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
commit983a16c08adbeb89c34e894647d4ae08a0417481 (patch)
tree064443222a08013d92f082ec72a34db4e400894c /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
parent0a00836bb7be52daa291c681d6041300b627bc21 (diff)
downloadbcm5719-llvm-983a16c08adbeb89c34e894647d4ae08a0417481.tar.gz
bcm5719-llvm-983a16c08adbeb89c34e894647d4ae08a0417481.zip
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. llvm-svn: 185135
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 2fb7664860a..4309dc1d48c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -112,8 +112,11 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) {
// in a predictable order.
if (const DbgDeclareInst *DI = dyn_cast<DbgDeclareInst>(I)) {
MachineModuleInfo &MMI = MF->getMMI();
+ DIVariable DIVar(DI->getVariable());
+ assert((!DIVar || DIVar.isVariable()) &&
+ "Variable in DbgDeclareInst should be either null or a DIVariable.");
if (MMI.hasDebugInfo() &&
- DIVariable(DI->getVariable()).Verify() &&
+ DIVar &&
!DI->getDebugLoc().isUnknown()) {
// Don't handle byval struct arguments or VLAs, for example.
// Non-byval arguments are handled here (they refer to the stack
OpenPOWER on IntegriCloud