diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-31 02:09:55 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-31 02:09:55 +0000 |
commit | 3ee34e14e164c247e7d631181179f77df90e069b (patch) | |
tree | ad77f0095dbf0421ea25bc75abe23e1dd9d28e68 /llvm/unittests/IR/IRBuilderTest.cpp | |
parent | dd77af870f12d722652da0ed28a7c3dbd3da348e (diff) | |
download | bcm5719-llvm-3ee34e14e164c247e7d631181179f77df90e069b.tar.gz bcm5719-llvm-3ee34e14e164c247e7d631181179f77df90e069b.zip |
Verifier: Move over DISubprogram::Verify()
Move over the remaining (somewhat complicated) check from
`DISubprogram::Verify()`. I suspect this check could be optimized --
e.g., it would be nice not to do another full traversal here -- but it's
not exactly obvious how. For now, just bring it over as is.
Once we have a better model for the "canonical" subprogram of a
`Function`, we should enforce that all `!dbg` attachments lead to the
canonical one.
llvm-svn: 233663
Diffstat (limited to 'llvm/unittests/IR/IRBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/IR/IRBuilderTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp index 3901fb85434..c721ef508bf 100644 --- a/llvm/unittests/IR/IRBuilderTest.cpp +++ b/llvm/unittests/IR/IRBuilderTest.cpp @@ -17,6 +17,7 @@ #include "llvm/IR/MDBuilder.h" #include "llvm/IR/Module.h" #include "llvm/IR/NoFolder.h" +#include "llvm/IR/Verifier.h" #include "gtest/gtest.h" using namespace llvm; @@ -303,8 +304,8 @@ TEST_F(IRBuilderTest, DIBuilder) { 0, true, nullptr); auto BadScope = DIB.createLexicalBlockFile(BarSP, File, 0); I->setDebugLoc(DebugLoc::get(2, 0, BadScope)); - EXPECT_FALSE(SP.Verify()); DIB.finalize(); + EXPECT_TRUE(verifyModule(*M)); } |