summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2016-12-15 08:09:08 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2016-12-15 08:09:08 +0000
commit402804b6d67c880c97e575342189025fe28c0f81 (patch)
treef05c793f67afb7f12b82a43b0926afd04c0ae4ec /clang/lib/AST/ASTContext.cpp
parent61ef150d53e4a9a3f14f614991f8132a5bb4eedc (diff)
downloadbcm5719-llvm-402804b6d67c880c97e575342189025fe28c0f81.tar.gz
bcm5719-llvm-402804b6d67c880c97e575342189025fe28c0f81.zip
Re-commit r289252 and r289285, and fix PR31374
llvm-svn: 289787
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 73ea66e98e8..7a98ac4c6e9 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -9434,6 +9434,16 @@ ASTContext::ObjCMethodsAreEqual(const ObjCMethodDecl *MethodDecl,
}
+uint64_t ASTContext::getTargetNullPointerValue(QualType QT) const {
+ unsigned AS;
+ if (QT->getUnqualifiedDesugaredType()->isNullPtrType())
+ AS = 0;
+ else
+ AS = QT->getPointeeType().getAddressSpace();
+
+ return getTargetInfo().getNullPointerValue(AS);
+}
+
// Explicitly instantiate this in case a Redeclarable<T> is used from a TU that
// doesn't include ASTContext.h
template
OpenPOWER on IntegriCloud