aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-09-09 19:47:11 +0000
committerManman Ren <manman.ren@gmail.com>2013-09-09 19:47:11 +0000
commit2c9905a1f3bcf22cc2f93332cc8411d11798ba07 (patch)
treecd46f1895d551822957384c349a4889109610933 /lib/IR/Verifier.cpp
parent0b67c2127eb3b26b53ccdb925c87aad6ae19819d (diff)
downloadexternal_llvm-2c9905a1f3bcf22cc2f93332cc8411d11798ba07.tar.gz
external_llvm-2c9905a1f3bcf22cc2f93332cc8411d11798ba07.tar.bz2
external_llvm-2c9905a1f3bcf22cc2f93332cc8411d11798ba07.zip
Debug Info: Use DIScopeRef for DIType::getContext.
In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Verifier.cpp')
-rw-r--r--lib/IR/Verifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index d939084052..b6d148b377 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -170,6 +170,8 @@ namespace {
Finder.reset();
DL = getAnalysisIfAvailable<DataLayout>();
+ if (!DisableDebugInfoVerifier)
+ Finder.processModule(M);
// We must abort before returning back to the pass manager, or else the
// pass manager may try to run other passes on the broken module.
@@ -2305,8 +2307,6 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
void Verifier::verifyDebugInfo(Module &M) {
// Verify Debug Info.
if (!DisableDebugInfoVerifier) {
- Finder.processModule(M);
-
for (DebugInfoFinder::iterator I = Finder.compile_unit_begin(),
E = Finder.compile_unit_end(); I != E; ++I)
Assert1(DICompileUnit(*I).Verify(), "DICompileUnit does not Verify!", *I);