summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-03-08 23:56:48 +0000
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-03-08 23:56:48 +0000
commitd1ba16e7620ed3967967a6244497b657784ecdbe (patch)
tree500350dee6fdbba54dd07144e59b50c83fcc25ae /clang/lib/Basic
parentd5561e0a0bbd484da17d3b68ae5fedc0a057246b (diff)
downloadbcm5719-llvm-d1ba16e7620ed3967967a6244497b657784ecdbe.tar.gz
bcm5719-llvm-d1ba16e7620ed3967967a6244497b657784ecdbe.zip
[DebugInfo] Add address space when creating DIDerivedTypes
Differential Revision: https://reviews.llvm.org/D29671 llvm-svn: 297321
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Targets.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 95321ec3813..6b0b9100b3e 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -2258,6 +2258,32 @@ public:
return LangAS::opencl_constant;
}
+ /// \returns Target specific vtbl ptr address space.
+ unsigned getVtblPtrAddressSpace() const override {
+ // \todo: We currently have address spaces defined in AMDGPU Backend. It
+ // would be nice if we could use it here instead of using bare numbers (same
+ // applies to getDWARFAddressSpace).
+ return 2; // constant.
+ }
+
+ /// \returns If a target requires an address within a target specific address
+ /// space \p AddressSpace to be converted in order to be used, then return the
+ /// corresponding target specific DWARF address space.
+ ///
+ /// \returns Otherwise return None and no conversion will be emitted in the
+ /// DWARF.
+ Optional<unsigned> getDWARFAddressSpace(
+ unsigned AddressSpace) const override {
+ switch (AddressSpace) {
+ case 0: // LLVM Private.
+ return 1; // DWARF Private.
+ case 3: // LLVM Local.
+ return 2; // DWARF Local.
+ default:
+ return None;
+ }
+ }
+
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override {
switch (CC) {
default:
OpenPOWER on IntegriCloud