summaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-09-14 23:13:28 +0000
committerDevang Patel <dpatel@apple.com>2011-09-14 23:13:28 +0000
commit734a67cda5a02be1654a2f89b811d7b6cbe3f5e5 (patch)
tree83b5bea9bdbcc35df956099082956a8fb33c3163 /lib/Analysis/DebugInfo.cpp
parente1d58a6556fe8b00d119373aeefbbecc9b86a1c5 (diff)
downloadllvm-734a67cda5a02be1654a2f89b811d7b6cbe3f5e5.tar.gz
llvm-734a67cda5a02be1654a2f89b811d7b6cbe3f5e5.tar.bz2
llvm-734a67cda5a02be1654a2f89b811d7b6cbe3f5e5.tar.xz
Add support to emit debug info for C++0x nullptr type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index a3dea40d87..aeb039ce71 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -130,7 +130,14 @@ MDNode *DIVariable::getInlinedAt() const {
/// isBasicType - Return true if the specified tag is legal for
/// DIBasicType.
bool DIDescriptor::isBasicType() const {
- return DbgNode && getTag() == dwarf::DW_TAG_base_type;
+ if (!DbgNode) return false;
+ switch (getTag()) {
+ case dwarf::DW_TAG_base_type:
+ case dwarf::DW_TAG_unspecified_type:
+ return true;
+ default:
+ return false;
+ }
}
/// isDerivedType - Return true if the specified tag is legal for DIDerivedType.