diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-10 22:09:58 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-10 22:09:58 +0000 |
commit | eea2e28dc17614ed4d14f9197e92b1c2c21365ce (patch) | |
tree | f11d046e63f4335da5b0a0f5c37f462d8a2597b1 /lib/Analysis | |
parent | 5d8d5e9423a9fd05f429ae0c08f876bc675eb871 (diff) | |
download | external_llvm-eea2e28dc17614ed4d14f9197e92b1c2c21365ce.zip external_llvm-eea2e28dc17614ed4d14f9197e92b1c2c21365ce.tar.gz external_llvm-eea2e28dc17614ed4d14f9197e92b1c2c21365ce.tar.bz2 |
Keep track of DIType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index b061827..3d9c933 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -955,9 +955,7 @@ void DebugInfoFinder::processModule(Module &M) { /// processType - Process DIType. void DebugInfoFinder::processType(DIType DT) { - if (DT.isNull()) - return; - if (!NodesSeen.insert(DT.getGV())) + if (!addType(DT)) return; addCompileUnit(DT.getCompileUnit()); @@ -1028,6 +1026,18 @@ void DebugInfoFinder::processDeclare(DbgDeclareInst *DDI) { processType(DV.getType()); } +/// addType - Add type into Tys. +bool DebugInfoFinder::addType(DIType DT) { + if (DT.isNull()) + return false; + + if (!NodesSeen.insert(DT.getGV())) + return false; + + TYs.push_back(DT.getGV()); + return true; +} + /// addCompileUnit - Add compile unit into CUs. bool DebugInfoFinder::addCompileUnit(DICompileUnit CU) { if (CU.isNull()) |